Gradle in Spring Boot project: Build leaves old Java code in debugger
Hi,
I use Intellij Ultimate 2018.3.4 on the latest version of macOS Mojave 10.14.3. I have a Spring Boot 2.0 project with Java 8, Gradle 4.9 and an an Angular front-end (originally generated by jHipster). My problem: Often, Intellij ignores Java code changes despite a "Build - Build Project" - until I do a clean build.
I suspect the reason is an outdated Intelij build folder - the "out" folder. The changed class doesn't get updated there in "out/production", but it does in the Gradle build folder "build/classes/java/main".
I'm using the Gradle wrapper with this configuration:

The Intellij project stores the "Project compiler output" in "out/classes", and my main module in "out/production/classes".
What am I doing wrong here?
Regards,
Karsten Silz
Please sign in to leave a comment.
Please see https://stackoverflow.com/a/46035904/104891 .
Thank you! I've had the Delegate IDE build/run actions to gradle option checked for ages, but to no avail. According to this comment, the Build project automatically compiler option in Intellij actually overwrites it! This is a big bug in my opinion.
Now that I have Build project automatically disabled, the Java code gets built & loaded correctly for now - and no more "out" folder. :-). I'm cautiously optimistic that Intellij now works properly with Gradle!