Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Widget compiling on ant takes long!

Madz R
1 decade ago May 04, 2012 3:50pm
Tobias Demuth
1 decade ago May 04, 2012 10:19pm

Most of the time is spent by the GWT-compiler on analyzing the sourcecode (it must look through all files to identify all dependencies) and compiling the code to all permutations - this is for all supported languages and all supported browsers. To reduce the compile-time during development, you can tell the compiler to create only one permutation: Your favorite language in your favorite browser. For achieving this, you need to edit your widgetset-definition; add the following line to only compile for Firefox:

<set-property name="user.agent" value="gecko1_8" />

More tricks might be found here.

Henri Sara
1 decade ago May 07, 2012 5:45am

While this does not help when you want to do a full build from scratch, note also that the widgetset only needs to be recompiled when you change the set of add-ons used in your project (or client side code directly in the project if you have any). You could e.g. have separate Ant targets for a complete build and a development time build that does not remove and rebuild the widgetset.