Not specifically a kotlin thing, but in my kotlin ...
# intellij
Not specifically a kotlin thing, but in my kotlin project using IntelliJ IDEA 2020.3 EAP (Ultimate Edition) Build #IU-203.4818.26 running this MainKt file via the IDE:
Copy code
fun main() {
  println("Hello World")
now kicks off a gradle task
, the net result of which is that instead of one line of output I get 34 lines of gradle build output. Is this a new thing? I kind of get that it might be desirable to reuse gradle to ensure that everything’s exactly the same in the IDE as via the build, but surely there’s a way to swallow the build output?
You may try to add
flag to the run command somewhere, this should suppress most Gradle output
Not obviously:
👍 1
Adding it to the Program arguments obviously gets passed to main, and to the VM options causes java not to launch
I can fix it here, but it seems crazy that I have to just to suppress the build output:
You can flip it back IDEA in that last screenshot if you want the old behavior
Yes, I thought I’d said as much - but what I’d like is to run it from gradle, because it makes sense to me not to have to worry about intellij correctly interpreting the project structure, but with the additional output suppressed. Or be able to configure the gradle logging per run configuration.
Raised , which will probably, despite my best efforts, be marked a duplicate immediately - I can never find existing issues in their YouTrack.
Historically Kotlin created an IDEA run configuration when running
in a Gradle project, even though for similar Java code a Gradle run configuration was created. In Kotlin 1.4.20 this has been fixed, i.e. it is now consistent with Java. The UX of build output could be improved, I agree. Thanks for the YouTrack report!
👍 2