1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Move gradle signing code out of allprojects

because it caused asking for the key passphrase multiple times, i.e. for
every subproject.
This commit is contained in:
Florian Schmaus 2014-04-17 12:51:54 +02:00
parent bd5ceded37
commit 649f7af276

View file

@ -34,17 +34,19 @@ allprojects {
'Bundle-Version': version)
}
gradle.taskGraph.whenReady { taskGraph ->
if (signingRequired && taskGraph.allTasks.any { it instanceof Sign }) {
// Use Java 6's console to read from the console (no good for a CI environment)
Console console = System.console()
console.printf '\n\nWe have to sign some things in this build.\n\nPlease enter your signing details.\n\n'
def password = console.readPassword('GnuPG Private Key Password: ')
}
allprojects { ext.'signing.password' = password }
gradle.taskGraph.whenReady { taskGraph ->
if (signingRequired
&& taskGraph.allTasks.any { it instanceof Sign }) {
// Use Java 6's console to read from the console (no good for a CI environment)
Console console = System.console()
console.printf '\n\nWe have to sign some things in this build.\n\nPlease enter your signing details.\n\n'
def password = console.readPassword('GnuPG Private Key Password: ')
console.printf '\nThanks.\n\n'
}
allprojects { ext.'signing.password' = password }
console.printf '\nThanks.\n\n'
}
}