I have an upload task in my gradle script:
uploadArchives {
repositories {
mavenDeployer {
repository(url: "${nexusUrl}/content/repositories/apps-releases") {
authentication(userName: nexusUsername, password: nexusPassword)
}
snapshotRepository(url: "${nexusUrl}/content/repositories/apps-snapshots") {
authentication(userName: nexusUsername, password: nexusPassword)
}
pom.groupId = "$defaultApplicationId"
pom.artifactId = 'MyApp'
pom.version = applicationVersionName()
}
}
}
And running this from teamcity with:
clean assembleDebug testDebugUnitTest crashlyticsUploadDistributionDebug uploadArchives
After building the debug version it seems like uploadArchives is building a release version too. So when the build is done I have both a debug and release apk as generated artefacts from the build. But if I remove uploadArchives it only generates debug apk.
Is there anyway to prevent this? It's not a big deal but it would be nice to only build the version I'm specifying; i.e. uploadDebugArchives and uploadReleaseArchives would be nice...
See here: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication
Set defaultPublishConfig
to the buildtype you want to publish.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With