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.