Skip to content

Commit 29dd658

Browse files
committed
Add message before crashing when console is null
1 parent cfa04f1 commit 29dd658

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

StudyplusAndroidSDK/gradle/build.publish.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ artifacts {
2929
archives androidJavadocsJar
3030
}
3131

32+
// gradle --daemon option makes System.console() null.
33+
// you must turn --daemon off when executing uploadArchives.
3234
def requireInput = { message ->
35+
if (System.console() == null){
36+
throw new IllegalStateException("try turning --daemon off")
37+
}
3338
"${System.console().readPassword(message)}"
3439
}
3540

0 commit comments

Comments
 (0)