Skip to content

Commit

Permalink
Make bintray parameters optional
Browse files Browse the repository at this point in the history
Summary:
By declaring the properties first, before using them in the scripts, you no
longer get an exception if you fail to specify them.

You can now build artifacts or run tests without specifying your bintray
password, which is probably what you want.

Reviewed By: emilsjolander

Differential Revision: D4913103

fbshipit-source-id: 8787af8973cebb84cd59e18c63a3a9f28e0ec348
  • Loading branch information
passy authored and facebook-github-bot committed Apr 19, 2017
1 parent b2a96ec commit 3569a13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bintrayUsername=
bintrayApiKey=
bintrayGpgPassword=
dryRun=false
8 changes: 4 additions & 4 deletions gradle/android-jcenter-install.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ ext {
}

def getBintrayUsername() {
return hasProperty('bintrayUsername') ? property('bintrayUsername') : System.getenv('BINTRAY_USERNAME')
return property('bintrayUsername') || System.getenv('BINTRAY_USERNAME')
}

def getBintrayApiKey() {
return hasProperty('bintrayApiKey') ? property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
return property('bintrayApiKey') || System.getenv('BINTRAY_API_KEY')
}

def getBintrayGpgPassword() {
return hasProperty('bintrayGpgPassword') ? property('bintrayGpgPassword') : System.getenv('BINTRAY_GPG_PASSWORD')
return property('bintrayGpgPassword') || System.getenv('BINTRAY_GPG_PASSWORD')
}

def dryRunOnly() {
return hasProperty('dryRun') ? property('dryRun').toBoolean() : false
return hasProperty('dryRun') ? property('dryRun').toBoolean() : false
}

def pomConfig = {
Expand Down
2 changes: 1 addition & 1 deletion java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply plugin: "com.jfrog.bintray"
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'
Expand Down

0 comments on commit 3569a13

Please sign in to comment.