Skip to content

Commit

Permalink
Updated build script to handle BinTray creds better
Browse files Browse the repository at this point in the history
  • Loading branch information
kpmmmurphy committed Feb 20, 2017
1 parent 5f2e3e6 commit 23fa274
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions alerter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ android {

//BinTray configuration - credentials stored in user's gradle.properties
bintray {
user = project.hasProperty('BINTRAY_USER')? project.getProperty('BINTRAY_USER') : null
key = project.hasProperty('BINTRAY_KEY')? project.getProperty('BINTRAY_KEY') : null
user = getBinTrayUser()
key = getBinTrayKey()

publications = ['Alerter']

Expand Down Expand Up @@ -133,7 +133,7 @@ bintrayUpload.dependsOn 'generatePomFileForAlerterPublication'

task showBintrayProps {
doLast {
println "Bintray user/password: ${project.hasProperty('BINTRAY_USER')? project.getProperty('BINTRAY_USER') : null}/${project.hasProperty('BINTRAY_KEY')? project.getProperty('BINTRAY_KEY') : null}"
println "Bintray user/password: ${getBinTrayUser()}/${getBinTrayKey()}"
}
}

Expand All @@ -158,3 +158,13 @@ artifacts {
archives javadocJar
archives sourcesJar
}

def final getBinTrayUser() {
def final String BINTRAY_USER = "BINTRAY_USER"
return project.hasProperty(BINTRAY_USER)? project.getProperty(BINTRAY_USER) : null
}

def final getBinTrayKey() {
def final String BINTRAY_KEY = "BINTRAY_KEY"
return project.hasProperty(BINTRAY_KEY)? project.getProperty(BINTRAY_KEY) : null
}

0 comments on commit 23fa274

Please sign in to comment.