Nuked publishLocal in favor of publishAar with parameters
@@ -4,10 +4,6 @@ apply plugin:'maven-publish'
apply plugin:'com.jfrog.bintray'
apply plugin:'com.github.dcendents.android-maven'
-def versionLocation = "build/last_deployed_version.txt"
-version = project.hasProperty('production') ? version_to_deploy :
- "EXPERIMENTAL-${version_to_deploy}-${dateNow}"
-
task javadoc(type:Javadoc) {
failOnError = false
options.encoding = 'UTF-8'
@@ -29,24 +25,18 @@ task androidSourcesJar(type:Jar) {
}
task publishAar {
- dependsOn bintrayUpload
-
- doLast {
- println "Deployed ${project.name} version: ${version}"
- file(versionLocation).text = version
- }
-}
+ def versionLocation = "build/last_deployed_version.txt"
+ def isExperimental = project.hasProperty('experimental')
+ def isProduction = project.hasProperty('production')
-task publishLocalInit {
- doLast {
- version = "LOCAL-${version_to_deploy}-${dateNow}"
- }
+ if (isExperimental || isProduction) {
+ dependsOn bintrayUpload
+ version = isProduction ? version_to_deploy : "EXPERIMENTAL-$version_to_deploy-$dateNow"
+ } else {
+ dependsOn publishToMavenLocal
+ version = "LOCAL-$version_to_deploy-$dateNow"
}
-task publishLocal {
- publishToMavenLocal.mustRunAfter(publishLocalInit)
- dependsOn publishToMavenLocal, publishLocalInit
-
doLast {
println "Deployed ${project.name} version: ${version}"
file(versionLocation).text = version
