CircleCI android nightly (snapshot) build publishing (#26069)
Summary:
To publish android snapshots to sonatype repository:
1. set gradle properties SONATYPE_NEXUS_USERNAME, SONATYPE_NEXUS_PASSWORD, ANDROID_SIGN_KEY, ANDROID_SIGN_PASS
these variables are stored as context environment variables in 'org-member' circleCI context
2. gradle -p ~/workspace/android/ uploadArchives
Due to gradle bugs in version 5 uploadArchives task works correctly with gradle version 4.10.3
That is also the reason of changes `archiveClassifier.set('sources')` -> `classifier = 'sources'` as archiveClassifier was introduced in version 5
Registering nightly build job that publishes *-SNAPSHOT version of android api
Testing:
CircleCI successful snapshot publishing run https://circleci.com/gh/pytorch/pytorch/2786503?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
Corresponding published artifacts can be seen: https://oss.sonatype.org/#nexus-search;quick~pytorch_android
<img width="1316" alt="Screenshot 2019-09-16 09 36 14" src="https://user-images.githubusercontent.com/6638825/64976167-7f447480-d865-11e9-95c5-874c5cd62b6d.png">
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26069
Differential Revision: D17406399
Pulled By: IvanKobzarev
fbshipit-source-id: c3dc1e68f02aacbb60d21f8355f676e6e5fc2897