Casey Kulm
11/19/2018, 7:40 PMreadLine()
to read user input. It is working fine when I run from Android Studio, although when I run from CLI with ./gradlew run
it seems to not be blocking to wait for readLine()
, and is immediately returning null
. Is there something I can do to achieve the expected behavior from CLI?dpk
11/19/2018, 7:43 PMdpk
11/19/2018, 7:44 PMCasey Kulm
11/19/2018, 7:49 PMEnter: =====--> 85% EXECUTING [10s]
all the time, and not actually displaying what I’m typing 😕dpk
11/19/2018, 7:52 PMjava -jar ...
. awkward but bash aliases can help there.Casey Kulm
11/19/2018, 8:43 PMCasey Kulm
11/21/2018, 4:15 PM./gradlew run --console plain
, andCasey Kulm
11/21/2018, 4:15 PMapply plugin: 'java'
apply plugin: 'application'
run {
standardInput = <http://System.in|System.in>
mainClassName = "com.mycompany.MainKt"
}
Casey Kulm
11/21/2018, 4:15 PM--console plain
made it so that the gradle pretty text didn’t disrupt inputCasey Kulm
11/21/2018, 4:15 PMstandardInput
option made it so that readLine()
wouldn’t immediately quitCasey Kulm
11/21/2018, 4:16 PMmainClassName
option paired up the main class with the gradle run taskdpk
11/21/2018, 4:17 PM