Created
May 18, 2016 16:19
-
-
Save aashreys/1b7456f0021613af85e9921049d69836 to your computer and use it in GitHub Desktop.
build.gradle script additions to allow uploading debug and release builds to different maven repos.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| configurations { | |
| debugArchives | |
| releaseArchives | |
| } | |
| artifacts { | |
| def path = "${project.rootDir}/library/build/outputs/aar/" | |
| debugArchives file: file(path + "${project.getName()}-debug.aar") | |
| releaseArchives file: file(path + "${project.getName()}-release.aar") | |
| } | |
| uploadDebugArchives { | |
| repositories { | |
| mavenDeployer { | |
| repository(url: "${artifactoryDevRepo}") { | |
| authentication(userName: "${artifactoryDevUploaderUser}", password: "${artifactoryDevUploaderKey}") | |
| } | |
| pom.groupId = groupIdString | |
| pom.artifactId = artifactIdString | |
| pom.version = versionNameString | |
| pom.packaging = 'aar' | |
| } | |
| } | |
| } | |
| uploadReleaseArchives { | |
| repositories { | |
| mavenDeployer { | |
| repository(url: "${artifactoryProdRepo}") { | |
| authentication(userName: "${artifactoryProdUploaderUser}", password: "${artifactoryProdUploaderKey}") | |
| } | |
| pom.groupId = groupIdString | |
| pom.artifactId = artifactIdString | |
| pom.version = versionNameString | |
| pom.packaging = 'aar' | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment