Similar (if not completely same) with: https://github.com/JetBrains/intellij-community/commit/707cf1427f66beb24faa5b8193217e52a8bb85d1 issue. In IntelliJ IDEA case, a fix has been published for version 2020.1. Can be used as reference.
Basically, printf() and print() does not work until a newline, not even System.out.flush() will work. This only happens on Gradle projects, and when running through the IDE (does not happen to Maven/Ant). This does not happen to println() because it prints new line.
Quite a breaking stuff, impossible to accept user input on the same line through the console.
As an example to demonstrate the issue:
A fix would be very appreciated, thank you.