Skip to content

Commit b5482d9

Browse files
author
Nakul Sabharwal
committed
loading credentials from local.properties for maven central.
1 parent f982948 commit b5482d9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

build.gradle

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,13 @@ def customizePom(pom) {
295295
}
296296

297297
gradle.taskGraph.whenReady { taskGraph ->
298-
if (taskGraph.allTasks.any { it instanceof Sign }) {
299-
if (project.rootProject.file('local.properties').exists()) {
300-
Properties properties = new Properties()
301-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
302-
tasks.withType(Sign)*.enabled = properties.getProperty('enableSigning').toBoolean()
303-
allprojects { ext."signing.keyId" = properties.getProperty('signing.keyId') }
304-
allprojects { ext."signing.secretKeyRingFile" = properties.getProperty('signing.secretKeyRingFile') }
305-
allprojects { ext."signing.password" = properties.getProperty('signing.password') }
306-
}
298+
if (project.rootProject.file('local.properties').exists()) {
299+
Properties properties = new Properties()
300+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
301+
tasks.withType(Sign)*.enabled = properties.getProperty('enableSigning').toBoolean()
302+
allprojects { ext."signing.keyId" = properties.getProperty('signing.keyId') }
303+
allprojects { ext."signing.secretKeyRingFile" = properties.getProperty('signing.secretKeyRingFile') }
304+
allprojects { ext."signing.password" = properties.getProperty('signing.password') }
307305
}
308306
}
309307

0 commit comments

Comments
 (0)