Browse Source

build.gradle: Add hint about obtaining system console

with newer Gradle versions and the Gradle daemon.
tags/4.2.1
Florian Schmaus 3 years ago
parent
commit
ddabe439b4
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      build.gradle

+ 3
- 0
build.gradle View File

@@ -192,6 +192,9 @@ gradle.taskGraph.whenReady { taskGraph ->
&& 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: ')



Loading…
Cancel
Save