Skip to content

Commit 503c93e

Browse files
author
Nakul Sabharwal
committed
Checks key to be used present in local.properties.
1 parent ebd9ac0 commit 503c93e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ publishing {
178178

179179
properties.load(project.rootProject.file('local.properties').newDataInputStream())
180180

181-
username = properties.getProperty('bintray.user').toLowerCase()
181+
username = (properties.containsKey('bintray.user')) ? properties.getProperty('bintray.user').toLowerCase() : "BINTRAY_USERNAME"
182182

183183
password = properties.getProperty('bintray.apikey')
184184

@@ -322,7 +322,7 @@ gradle.taskGraph.whenReady { taskGraph ->
322322
if (project.rootProject.file('local.properties').exists()) {
323323
Properties properties = new Properties()
324324
properties.load(project.rootProject.file('local.properties').newDataInputStream())
325-
tasks.withType(Sign)*.enabled = properties.getProperty('enableSigning').toBoolean()
325+
tasks.withType(Sign)*.enabled = (properties.containsKey('enableSigning')) ? properties.getProperty('enableSigning').toBoolean() : false
326326
allprojects { ext."signing.keyId" = properties.getProperty('signing.keyId') }
327327
allprojects { ext."signing.secretKeyRingFile" = properties.getProperty('signing.secretKeyRingFile') }
328328
allprojects { ext."signing.password" = properties.getProperty('signing.password') }

0 commit comments

Comments
 (0)