Debugging and reloading of compiled classes in a gradle backed project

Answered

Hi

 

We have recently had our main project put under gradle build and control in generel. We are therefor importing this project as a gradle project.

We are pretty happy with that, but when debugging in Idea its a pain as class reloading isnt working and compiling a simple one line change takes forever

We have switched on this option

as this seemed like the only way to get Idea to work with Gradle

This is a major showstopper for us as productivity have plummeted, please advise

0
7 comments

> as this seemed like the only way to get Idea to work with Gradle

It's not the only way.

What exactly doesn't work for you when this checkbox is disabled?

Can you share a sample project to reproduce the problem?

Gradle build is usually slower that internal IntelliJ IDEA build.

0

Two things:

1. Gradle 3.4 has large performance improvements.

2. The simplest case is a Gradle build file that increments build numbers and tags the jars/wars with the build number.

0

> compiling a simple one line change takes forever

> Gradle 3.4 has large performance improvements

Does it take forever with 3.4 as well?

0
Avatar
Permanently deleted user

@Charles

- We are running on Gradle 3.4.1

- One of the main sellingpoints was getting identical build when compiling on CI server as well as in Idea

Sorry for not making this clear.

We had too low a heapsize set. Setting this at a more reasonable size helped, but it is still extremely slow compared to the old Idea setup. This is mainly as it seems like all files in a module needs compiling when changing something i a src file in the module.

 

@Serge

We have OCI to do both a version upgrade of Grails and moving our old Ant based build to Gradle. They should have tried to reach out to you via your Slack channel?
When we are not delegating to gradle we are having problems compiling the multimodule project. It seem to me like the modules different dependencies arent translated properly into the Idea setup.

 

 

0
Avatar
Permanently deleted user

Hi Serge

Thanks for pointing this out! This bug seems to be exactly what have hit us on doing the setup without the delegation to gradle. I have just tried out the 2017rc1 version, and without the delegation it works like we would it expect. 

In generel it works great, but when it comes to our Grails modules it is still a bit shaky wrt compiling, class reloading and stepping into classes. But this is not a new issue.

But i really have to say, that the gradle delegation is so insanely far from being usable that in my humble opinion you should just remove it untill it gets into a better shape. The list of what is not working and what takes very very long is just too long.

0
Avatar
Permanently deleted user

Just to make my point about the gradle delegation clear, then it seems that even your really cool developer advocate for Idea hit this and disables it in a hurry :)

https://blog.jetbrains.com/idea/2017/03/webinar-recording-composite-builds-with-gradle

0

Please sign in to leave a comment.