aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Jin <kjin@google.com>2015-03-10 18:15:20 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-10 18:15:20 +0000
commit0d38dc1ff5ca7bc42b475b99b26b0ed80a1c4372 (patch)
treee6d0c967ca96a00aef171eac644aa119c829fac9
parent3758b83e50802b28588edbbd7a58439e10536715 (diff)
parentc2bbac30b57b06521c1c9bea0e66976f611e475e (diff)
downloaddroiddriver-0d38dc1ff5ca7bc42b475b99b26b0ed80a1c4372.tar.gz
am c2bbac30: am 4a662771: Merge "Use project properties to authenticate with JCenter"
* commit 'c2bbac30b57b06521c1c9bea0e66976f611e475e': Use project properties to authenticate with JCenter
-rw-r--r--artifactory.gradle4
-rw-r--r--build.gradle4
-rw-r--r--jcenter.gradle4
-rw-r--r--properties.gradle7
-rw-r--r--releasing_to_jcenter.md13
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: