https://kotlinlang.org logo
#announcements
Title
# announcements
n

napperley

08/13/2017, 11:35 PM
Managed to track down the cause of the problem where readLine() doesn't block and wait for keyboard input like one would expect. If Gradle is used to build a Kotlin project then the problem occurs. Has there been an issue filed about this? Can get readLine() working just fine in an ordinary Kotlin project in IntelliJ, and in the Kotlin REPL. If the IntelliJ Kotlin REPL is used in a open Gradle project, using Kotlin JVM then the same problem occurs.
Gradle Input Stream problem was first encountered in 2012 (https://discuss.gradle.org/t/how-can-i-execute-a-java-application-that-asks-for-user-input/3264), and does occur in Gradle 4.0. Haven't tried Gradle 4.1 to see if the problem has been solved.
2 Views