gwt-gradle-plugin icon indicating copy to clipboard operation
gwt-gradle-plugin copied to clipboard

Optimize GWT compilation by only starting compileGwt if actual client-side GWT source changed

Open JoachimK opened this issue 10 years ago • 1 comments

The gwt plugin should only start the compileGwt task when any of the files relevant for GWT are changed. Currently, whenever any of the java files are changed compileGwt is started, even though it might just be a server side file totally unrelated to GWT. Ideally the necessary files would be determined from the get module declaration, however I realize that this is not easy.

I tried to specify the dependencies by following #33 and splitting up my source files into the main part for the java server side, the shared part and the client part.

I wanted my main sourceSet to contain all the server side code as I thought this will work best with other plugins (e.g. war, jetty and tomcat). However, I couldn't get the dependencies set up correctly between the source sets to get it to build again.

I tried both the approach by @steffenschaefer and by @jnehlmeier and also tried to combine them, but I didn't get it to compile.

I would prefer to have one project with different source sets, but would also be willing to split it up into individuals projects for each of server, shared and client code.

Could you describe how to do that or add a chapter about it in the documentation?

JoachimK avatar Feb 12 '15 15:02 JoachimK

+1 for this one - the gwtCompile is HEAVY, any optimizations to avoid unneccesary compiles is a plus.

rlf avatar Mar 18 '15 10:03 rlf