Incremental Build With Multiple GWT Modules
Hi,
First I have to say I was really happy to find this addon and its pretty much working perfectly for my setup. But I have an issue that I don't know if it is possible to solve with the current implementation of the plugin.
For projects that only contains one GWT module the flagging of out-of-date files work flawlessly but I have a project with multiple GWT modules and I can't get the incremental feature to work for individual modules. The entire task will be flagged as out of date on changes which will cause all GWT modules to rebuild even though just one of the modules actually have changed.
Example Multiple Modules:
gwt {
gwtVersion = '2.6.1'
modules('com.test.moduleOne.ModuleOne',
com.test.moduleTwo.ModuleTwo')
}
If I make a change to a file in ModuleOne both ModuleOne and ModuleTwo will be rebuilt since the compileGwt task will be flagged as out-of-date.
Is it possible to make it so that each module will be flagged independently if they have no dependencies between them?
Thanks!
"if they have no dependencies between them" ... sounds like quite some work. The plugin would need to figure out the dependency tree of all supplied GWT modules.
I think you should just create an additional Gradle module instead so that you have a 1:1 mapping between compilable GWT module and Gradle module.
As a side note: The GWT Maven plugin of @tbroyer supports this 1:1 thought even more as it is able to generate the <inherits> of GWT modules based on the Maven module dependencies.
Maybe the plugin should instead create one compile task for each module?
That said, as a user, I think I'd be OK with the plugin not making such optimizations, and having to configure all the tasks (or just additional tasks) manually if I really want an optimized build.
Thanks for your answers. I have a couple of projects where I use GWT. If the project is pure GWT (one module) this is pretty much the setup to use. But in projects that utilize some parts GWT (multiple modules for different parts) rebuilding every single module, even tough only one was changed, can be the difference between a 2 minutes build time and a 15 minutes build time. This is handled somewhat OK when using an IDEA like IntelliJ but recently I've started migrating to a Gradle build.