Hi guys.
We would now like to ask for feedback on the changes that have gone in there so far. Also if anyone would care to test this with their setup so we can get an idea if anything has been broken.
- More ways to set the GWT home.
- Ivy based dependency downloading for GWT core libraries, gin and GWT module libraries, controlled in BuildConfig.
- Extra GWT test types and support for compiling the GWT code with a different java version (thanks to Predrag)
- Additional mode for parallelising the compilation (running multiple compilations in parallel, not the GWT workers)
There are still a few changes planned (the ones Ben has filed in JIRA recently), however this represents the major features going into 0.6.
Grails 2 has not been fully tested with this, or previous releases. We are intending to test fully with grails 2 and apply any fixes to make a 0.6.1 release.
GWT home resolution
With the GWT home you now have some additional options.
- Set the GWT_HOME environment variable.
- Set the gwt.home system property
- Set the gwt.home Grails settings property (eg, in BuildConfig or your user wide settings.
- Set gwt.home="ivy" - this states that you want to manage all the dependencies in Ivy yourself (this essentially disables all checks)
- Lastly you can set gwt.version and allow the required dependencies to be downloaded via Ivy (see below). I'm hoping that this becomes the preferred approach.
Ivy dependency downloading
gwt {
version="2.3.0"
gin.version="1.5.0"
dependencies=['com.extjs:gxt:2.2.0']
}
The gwt.version property will resolved to the required gwt-dev/ servlet jars (including validation where appropriate) and place them onto the classpath.
The gwt.gin.version property is for convenience, it will interpret 1.0 and 1.5.0 to give the appropriate gin jar and the required dependencies (guice etc)
The gwt.dependencies property takes a list of strings that are in the same format as the regular grails dependencies. Transitive dependencies are not resolved and included. If there are transitive dependencies you require, explicitly add them to the list.
Parallel Compilation
GWT has support for compiling the different permutations of a module in parallel using worker threads for each.
Using this approach still leaves significant portions of the compilation running single threaded. Each module in turn is run through the compiler, and the initial phases are single threaded, only the final stage of writing out the JS benefits from parallelisation.
An additional approach has been included that will run multiple GWT compiler instances in parallel. This means that the entire CPU capacity you have available can be used all the time.
How much, if any, benefit you will get from this you will have to test for yourself.
The plugin is currently set up to automatically select the approach used based on the number of available cpu cores and the number of modules to compile.
You can force which approach to use by setting the
gwt.parallel=true //use full parallel
gwt.parallel=false //use gwt workers (as now)
Leaving this option out will allow the plugin to choose.
So, thats all I've got for now. The next big item is to improve the documentation of the plugin and bring it up to date to go with the new release.
Thanks,
David
--