diff options
author | Kevin Jin <kjin@google.com> | 2015-03-09 19:23:13 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-09 19:23:13 +0000 |
commit | c2bbac30b57b06521c1c9bea0e66976f611e475e (patch) | |
tree | e6d0c967ca96a00aef171eac644aa119c829fac9 | |
parent | 816720b8489b922f4bfcee892218e8c81b1359e4 (diff) | |
parent | 4a662771b825241a670a3ba2ef6f4c877c5b92d5 (diff) | |
download | droiddriver-c2bbac30b57b06521c1c9bea0e66976f611e475e.tar.gz |
am 4a662771: Merge "Use project properties to authenticate with JCenter"
* commit '4a662771b825241a670a3ba2ef6f4c877c5b92d5':
Use project properties to authenticate with JCenter
-rw-r--r-- | artifactory.gradle | 4 | ||||
-rw-r--r-- | build.gradle | 4 | ||||
-rw-r--r-- | jcenter.gradle | 4 | ||||
-rw-r--r-- | properties.gradle | 7 | ||||
-rw-r--r-- | releasing_to_jcenter.md | 13 |
5 files changed, 10 insertions, 22 deletions
diff --git a/artifactory.gradle b/artifactory.gradle index d9f9039..b8b2f6c 100644 --- a/artifactory.gradle +++ b/artifactory.gradle @@ -16,8 +16,8 @@ artifactory { publish { // gradle clean artifactoryPublish repository { repoKey = 'oss-snapshot-local' - username = bintray_user - password = bintray_key + username = bintrayUser + password = bintrayKey maven = true } defaults { diff --git a/build.gradle b/build.gradle index 5f3c73e..6ba4919 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,8 @@ // Gradle >= 2.1 required buildscript { - ext.bintrayFile = project.rootProject.file('bintray.properties') - ext.bintrayEnabled = bintrayFile.exists() + ext.bintrayEnabled = project.hasProperty('bintrayUser') && + project.hasProperty('bintrayKey') repositories { jcenter() diff --git a/jcenter.gradle b/jcenter.gradle index 84da23f..4b23990 100644 --- a/jcenter.gradle +++ b/jcenter.gradle @@ -1,8 +1,8 @@ bintray { publish = true configurations = ['archives'] - user = bintray_user - key = bintray_key + user = bintrayUser + key = bintrayKey pkg { repo = 'maven' userOrg = 'appium' diff --git a/properties.gradle b/properties.gradle index 9753d90..a6de28b 100644 --- a/properties.gradle +++ b/properties.gradle @@ -1,10 +1,3 @@ -if (bintrayEnabled) { - Properties properties = new Properties() - properties.load(bintrayFile.newDataInputStream()) - ext.bintray_user = properties.getProperty('bintray.user') - ext.bintray_key = properties.getProperty('bintray.key') -} - ext.ddArtifactId = 'droiddriver' ext.ddGroup = 'io.appium' ext.ddVersion = '1.0.0-SNAPSHOT' diff --git a/releasing_to_jcenter.md b/releasing_to_jcenter.md index eaeb815..72019f2 100644 --- a/releasing_to_jcenter.md +++ b/releasing_to_jcenter.md @@ -1,24 +1,19 @@ # Releasing to JCenter -Add the following credentials to `bintray.properties` Your API key can be [found here](https://bintray.com/user/edit/tab/apikey). +Creating a release on jcenter is done by invoking the binaryUpload task with a bintray user and API key. Your API key can be [found here](https://bintray.com/user/edit/tab/apikey). -``` -bintray.user=USERNAME -bintray.key=APIKEY -``` +`gradle -PbintrayUser=myusername -PbintrayKey=123 clean bintrayUpload` -Creating a release on jcenter is done by invoking the binaryUpload task. Note that you'll need to be a member of the appium organization on jcenter before publishing. Existing members are able to invite new ones. +Note that you'll need to be a member of the appium organization on jcenter before publishing. Existing members are able to invite new ones. Update the version number in `build.gradle` by modifying the value of `ddVersion`. Official releases should be made only after removing the `-SNAPSHOT` suffix. If the same version number is used as an existing release of droiddriver then jcenter will reject the upload. -`gradle clean bintrayUpload` - # Releasing snapshots to artifactory Snapshots of DroidDriver are released to `http://oss.jfrog.org/artifactory` in the oss-snapshot-local repository. -`gradle clean artifactoryPublish` +`gradle -PbintrayUser=myusername -PbintrayKey=123 clean artifactoryPublish` Note that resolving the snapshots requires adding the maven repo to the gradle build file: |