diff options
author | Kevin Jin <kjin@google.com> | 2015-03-13 07:21:02 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-13 07:21:02 +0000 |
commit | 822efa5a07370f251c45768ebfe20fd82d00e5df (patch) | |
tree | 83bfd9519fe67b0aa1838829c42f2af194160c34 | |
parent | 5f45e64e7c9eba065491231b876697675cb9f213 (diff) | |
parent | 040e46c3cc80de8eb21166f912e074a8b94c147f (diff) | |
download | droiddriver-822efa5a07370f251c45768ebfe20fd82d00e5df.tar.gz |
am 040e46c3: Merge "Fix artifactory snapshots"
* commit '040e46c3cc80de8eb21166f912e074a8b94c147f':
Fix artifactory snapshots
-rw-r--r-- | artifactory.gradle | 17 | ||||
-rw-r--r-- | maven.gradle | 55 | ||||
-rw-r--r-- | releasing_to_jcenter.md | 2 |
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: |