aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Jin <kjin@google.com>2015-03-12 17:46:36 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-12 17:46:36 +0000
commit040e46c3cc80de8eb21166f912e074a8b94c147f (patch)
tree83bfd9519fe67b0aa1838829c42f2af194160c34
parent05fe364c3bc2406e8703f69645a1ef8664b2b4ee (diff)
parente825f1b21d5b5723f99cfe9fcaadecbd6af62015 (diff)
downloaddroiddriver-040e46c3cc80de8eb21166f912e074a8b94c147f.tar.gz
Merge "Fix artifactory snapshots"
-rw-r--r--artifactory.gradle17
-rw-r--r--maven.gradle55
-rw-r--r--releasing_to_jcenter.md2
3 files changed, 47 insertions, 27 deletions
diff --git a/artifactory.gradle b/artifactory.gradle
index b8b2f6c..c6c9964 100644
--- a/artifactory.gradle
+++ b/artifactory.gradle
@@ -7,13 +7,28 @@ publishing {
groupId ddGroup
artifactId ddArtifactId
version ddVersion
+ artifact "${project.buildDir}/outputs/aar/${project.name}-release.aar"
+ artifact sourcesJar
+ artifact javadocJar
+
+ pom.withXml { xmlProvider ->
+ // Create string from project.ext.pomXml
+ def pomString = new StringWriter()
+ pomXml.writeTo(pomString)
+ pomString = pomString.toString()
+
+ // Replace default xml with pomXml
+ def xmlStringBuilder = xmlProvider.asString()
+ xmlStringBuilder.setLength(0)
+ xmlStringBuilder.append(pomString)
+ }
}
}
}
artifactory {
contextUrl = 'http://oss.jfrog.org/artifactory'
- publish { // gradle clean artifactoryPublish
+ publish {
repository {
repoKey = 'oss-snapshot-local'
username = bintrayUser
diff --git a/maven.gradle b/maven.gradle
index e325de0..ae1439e 100644
--- a/maven.gradle
+++ b/maven.gradle
@@ -1,34 +1,39 @@
apply plugin: 'com.github.dcendents.android-maven'
-install {
- repositories.mavenInstaller {
- pom {
- project {
- packaging 'aar'
- version = ddVersion
- groupId = ddGroup
- artifactId = ddArtifactId
+project.ext.innerPom = { // used by mavenInstaller
+ project {
+ packaging 'aar'
+ version = ddVersion
+ groupId = ddGroup
+ artifactId = ddArtifactId
- description = ddDescription
- url ddWebsite
+ description = ddDescription
+ url ddWebsite
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- }
- }
+ licenses {
+ license {
+ name 'The Apache Software License, Version 2.0'
+ url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ }
+ }
- scm {
- connection ddGit
- developerConnection ddGit
- url ddWebsite
- }
+ scm {
+ connection ddGit
+ developerConnection ddGit
+ url ddWebsite
+ }
- issueManagement {
- url ddTracker
- }
- }
+ issueManagement {
+ url ddTracker
}
}
}
+
+project.ext.pomXml = pom innerPom // used by mavenJava publication in artifactory
+
+install {
+ repositories.mavenInstaller {
+ // will not work with just pomXml
+ pom innerPom
+ }
+}
diff --git a/releasing_to_jcenter.md b/releasing_to_jcenter.md
index 72019f2..27d5167 100644
--- a/releasing_to_jcenter.md
+++ b/releasing_to_jcenter.md
@@ -13,7 +13,7 @@ Update the version number in `build.gradle` by modifying the value of `ddVersion
Snapshots of DroidDriver are released to `http://oss.jfrog.org/artifactory` in the oss-snapshot-local
repository.
-`gradle -PbintrayUser=myusername -PbintrayKey=123 clean artifactoryPublish`
+`gradle -PbintrayUser=myusername -PbintrayKey=123 clean assemble artifactoryPublish`
Note that resolving the snapshots requires adding the maven repo to the gradle build file: