gradle: Use gpg-agent for signing

This commit is contained in:
Florian Schmaus 2019-07-20 22:34:05 +02:00
parent 2da2633b0f
commit 5ba85aa8a7
1 changed files with 1 additions and 17 deletions

View File

@ -289,23 +289,6 @@ configure (junit4Projects) {
}
}
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)
def console = System.console()
if (console == null) {
throw new Exception("Could not obtain system console (Console is 'null'). Did you build with gradle daemon? Try the same Gradle command with \"--no-daemon\".")
}
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 }
console.printf '\nThanks.\n\n'
}
}
task copyAllJavadocDocFiles(type: Copy) {
from javadocAllProjects.collect { project ->
"${project.projectDir}/src/javadoc" }
@ -502,6 +485,7 @@ subprojects {
}
}
signing {
useGpgCmd()
required { signingRequired }
sign configurations.archives
}