build.gradle: Add hint about obtaining system console

with newer Gradle versions and the Gradle daemon.
This commit is contained in:
Florian Schmaus 2017-07-03 10:36:05 +02:00
부모 b0298619ba
커밋 ddabe439b4
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제

파일 보기

@ -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: ')