From b5482d9461efceffd05228b388550ab1dae049f0 Mon Sep 17 00:00:00 2001 From: Nakul Sabharwal Date: Thu, 27 Sep 2018 17:59:21 +0530 Subject: [PATCH] loading credentials from local.properties for maven central. --- build.gradle | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index a2d522d74f6..276e403d656 100644 --- a/build.gradle +++ b/build.gradle @@ -295,15 +295,13 @@ def customizePom(pom) { } gradle.taskGraph.whenReady { taskGraph -> - if (taskGraph.allTasks.any { it instanceof Sign }) { - if (project.rootProject.file('local.properties').exists()) { - Properties properties = new Properties() - properties.load(project.rootProject.file('local.properties').newDataInputStream()) - tasks.withType(Sign)*.enabled = properties.getProperty('enableSigning').toBoolean() - allprojects { ext."signing.keyId" = properties.getProperty('signing.keyId') } - allprojects { ext."signing.secretKeyRingFile" = properties.getProperty('signing.secretKeyRingFile') } - allprojects { ext."signing.password" = properties.getProperty('signing.password') } - } + if (project.rootProject.file('local.properties').exists()) { + Properties properties = new Properties() + properties.load(project.rootProject.file('local.properties').newDataInputStream()) + tasks.withType(Sign)*.enabled = properties.getProperty('enableSigning').toBoolean() + allprojects { ext."signing.keyId" = properties.getProperty('signing.keyId') } + allprojects { ext."signing.secretKeyRingFile" = properties.getProperty('signing.secretKeyRingFile') } + allprojects { ext."signing.password" = properties.getProperty('signing.password') } } }