I have rather large GWT project that depends on a number of third party libraries. When compiling the GWT part of the application, I see that the GWT compiler goes through 10 permutations. But I'm only compiling for 5 different browsers, and for one locale. How can I figure out what is causing the each permutation? Is there some setting I can enable that prints out what each permutation is for when it is compiled. Something that would give me output like:
Compiling Permutation 0 - Browser ie8 and Locale En ....
Compiling Permutation 1 - Browser ie9 and Locale En ....
My gwt.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='LibraryPlace'>
<inherits name="com.github.gwtbootstrap.BootstrapNoResources"/>
<inherits name='com.biglibrary.libraryplace.model.LibraryModel'/>
<inherits name="com.biglibrary.common.LiCommon"/>
<inherits name="org.atmosphere.gwt20.AtmosphereGwt20"/>
<inherits name='com.google.web.bindery.event.EventBinder'/>
<inherits name="com.google.gwt.logging.Logging"/>
<stylesheet src="/css/datepicker.css"/>
<!-- LATO font -->
<!--<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic">-->
<!-- Bootstrap CSS -->
<stylesheet src="http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic"/>
<!--<stylesheet src="/css/bootstrap.css"/>
<stylesheet src="/css/bootstrap-responsive.css"/>-->
<stylesheet src="/css/toastr.css"/>
<stylesheet src="/css/fullcalendar.css"/>
<!-- Library Place New Custom CSS based on MyAdmin Theme Custom CSS -->
<stylesheet src="/css/style.css"/>
<stylesheet src="/css/clock/clock-style.css"/>
<source path='resources'/>
<replace-with class="com.biglibrary.libraryplace.resources.LibraryConfigurator">
<when-type-is class="com.github.gwtbootstrap.client.ui.config.Configurator"/>
</replace-with>
<public path="resources">
<exclude name="** /*.java"/>
<exclude name="** /*.class"/>
</public>
<!-- Other module inherits-->
<inherits name="de.devbliss.gwt.xdm.XDM"/>
<inherits name="com.watopi.chosen.Chosen"/>
<!-- enable @CORS annotations in restygwt -->
<extend-configuration-property
name="org.fusesource.restygwt.annotationresolver"
value="org.fusesource.restygwt.rebind.CORSAnnotationResolver"/>
<replace-with class="de.devbliss.gwt.xdm.client.impl.CORSTransportLayer">
<when-type-is class="com.biglibrary.libraryplace.client.xdr.XDRTransportLayer"/>
<any>
<when-property-is name="user.agent"
value="gecko1_8"/>
<when-property-is name="user.agent"
value="safari"/>
</any>
</replace-with>
<inherits name="com.google.gwt.logging.Logging"/>
<!-- gwt logging properties -->
<set-property name="gwt.logging.logLevel"
value="FINE"/>
<set-property name="gwt.logging.popupHandler"
value="ENABLED">
<any>
<when-property-is name="user.agent"
value="ie8"/>
<when-property-is name="user.agent"
value="ie9"/>
</any>
</set-property>
<!--Gives java like stack trace for errors that come up in js-->
<set-property name="compiler.emulatedStack"
value="true"/>
<set-configuration-property
name="compiler.emulatedStack.recordFileNames"
value="true"/>
<!-- Specify the app entry point class. -->
<entry-point class='com.biglibrary.libraryplace.client.LibraryPlace'/>
<!--Chrome or Safari-->
<set-property name="user.agent" value="opera,ie8, gecko1_8, safari, ie9"/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<define-configuration-property name="gin.ginjector"
is-multi-valued="false"/>
<set-configuration-property name="gin.ginjector"
value="com.biglibrary.libraryplace.client.gin.AppGinjector"/>
<!--
Ensure Ui Binder files are using Safe HTML to prevent XSS.
-->
<set-configuration-property name="UiBinder.useSafeHtmlTemplates"
value="true"/>
<!-- English language, independent of country. -->
<extend-property name="locale"
values="en"/>
<!-- Default language (English) -->
<set-property-fallback name="locale"
value="en"/>
<add-linker name="xsiframe"/>
<set-configuration-property name="gwt.superdevmode"
value="on"/>
<set-configuration-property name="devModeRedirectEnabled"
value="true"/>
<set-property name="compiler.useSourceMaps"
value="true"/>
</module>
As you are compiling your project using the xsiframe
linker you will have a compilation-mappings.txt
file in your javascript folder.
It contains a very useful list with all permutations and the properties which triggers each one.
F7437BC8947642CC76A8E491E7E52DB4.cache.js
mgwt.os desktop
user.agent safari
F7437BC8947642CC76A8E491E7E52DB4.cache.js
mgwt.os desktop
user.agent gecko1_8
[...]
Once you know which properties produce each permutation, you can dive into *.gwt.xml
files to know which properties are increasing the permutation number.
In your case, if you are using just en
language, it is better not set it at all, so as gwt will compile only default
, otherwise it is compiling default
and en
languages.
Another useful option for reducing permutations is to use the collapse-property
feature.
<collapse-property name="language" values="*" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With