diff --git a/ethereumj-core/build.gradle b/ethereumj-core/build.gradle index 5d4710f3..802c5663 100644 --- a/ethereumj-core/build.gradle +++ b/ethereumj-core/build.gradle @@ -136,6 +136,7 @@ jacocoTestReport { def bintrayUsername = project.hasProperty('bintrayUser') ? project.bintrayUser : '' def bintrayPassword = project.hasProperty('bintrayKey') ? project.bintrayKey : '' def pullRequest = System.getenv('TRAVIS_PULL_REQUEST') +def branchName = System.getenv('TRAVIS_BRANCH') artifactory { contextUrl = 'http://oss.jfrog.org/artifactory' @@ -156,8 +157,7 @@ artifactory { artifactoryPublish.onlyIf { (!pullRequest || pullRequest == 'false') && - project.version.endsWith('-SNAPSHOT') && (buildEnv.branch.startsWith('master')) - + project.version.endsWith('-SNAPSHOT') && (branchName.startsWith('master')) } bintray { @@ -187,7 +187,7 @@ install { task publish { - println "publishing if master current branch: " + buildEnv.branch + println "publishing if master current branch: " + branchName description = "Publishes snapshots to oss.jfrog.org and releases to Bintray/JCenter" dependsOn artifactoryPublish, bintrayUpload }