mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +01:00
gradle: Use gpg-agent for signing
This commit is contained in:
parent
2da2633b0f
commit
5ba85aa8a7
1 changed files with 1 additions and 17 deletions
18
build.gradle
18
build.gradle
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue