How to get console logs for Gradle projects? Follow
Hope you are doing well and healthy.
I wrote a plugin which reads the logs from the console. Currently, it works very well for the Maven projects. Unfortunately, I cannot say the same thing for Gradle. Logging part is simple and can be found here.
When the plugin tries to catch a log from a Gradle project, the plugin throws an error;
Exception in thread "DisconnectableInputStream source reader" org.gradle.api.UncheckedIOException: java.nio.channels.AsynchronousCloseException
Caused by: java.nio.channels.AsynchronousCloseException
... 1 more
Thanks in advance and have a great day.
Please sign in to leave a comment.
Could you please provide more details?
It would be perfect if you can provide the minimal project this issue occurs in and instructions on how to reproduce it.
Hi Karol 👋🏼
Thanks for your answer.
To reproduce that, please follow the below steps;
If you download a simple Maven project from https://start.spring.io, it works like a charm without any errors.
I am looking forward to hearing your opinion.
I cannot reproduce it locally and found this issue which contains exactly the same stacktrace as you pasted:
Could you please check it with the 2021.3.1 or newer?
Thanks again for the reply.
That is really strange that you can't reproduce. One of my plugin user reported that to me, and after that I confirmed that is not working for Gradle projects.
I use IntelliJ 2021.3.2 and also updated the plugin `platformVersion` to 2021.3.2. In both platforms I still have the same issue. BTW. I forgot to say you should run the simple Gradle project. So correct order would be;
How can you support me? Can we make a video call?
Have a nice weekend in advance.
I run the "bootRun" Gradle task - is it fine?
I still don't have any errors related to Gradle logs. I'm running it on macOS, maybe this affects other OS?
Your plugin code seems fine. I suggest opening an issue in https://youtrack.jetbrains.com/issues/IDEA as it seems to be a product issue.
Thanks Karol, it is reported here.