How to find all available settings in .gwt.xml
Posted by David Chandler on December 20, 2010
One fairly well-known trick to speed up GWT compilation during development is to compile for one browser only by setting the user.agent property in your .gwt.xml. For example, to compile a permutation for Chrome / Safari only, use:
<define-property name="user.agent" values="safari"/>
Ever wondered where to find more such properties you can experiment with? Available properties are defined in .gwt.xml files in the GWT source. A simple way to find them all is to browse GWT source, then search for “define-property”. For example, you’ll see that UserAgent.xml contains this:
<define-property name="user.agent" values="ie6,ie8,gecko,gecko1_8,safari,opera"/>
Of if you prefer the command line, you can check out GWT source from SVN, then run
find . -name *.gwt.xml | xargs grep define-property
Happy sleuthing…
Dan Billings said
A humble inquiry: Shouldn’t there be a DTD somewhere so sleuthing wouldn’t be necessary?
David Chandler said
@Dan, yes, a DTD would be nice. I recommend to check the GWT issue tracker and log a request if not there already.
Sam Edwards said
Thanks for the tip! Would Firefox 3.6 be using a “gecko” or “gecko1_8” user agent?
Also, I’ve been following your blog for over a year because of your GAE/GWT/Objectify posts and am excited to hear you’ll be speaking in Arlington, VA in January (http://www.meetup.com/ncagtug/calendar/15789843). I registered for it today and am looking forward to hearing more!
David Chandler said
Thanks, Sam. FF 3.6 would be gecko1_8. Just plain gecko refers to pre-1.8 versions. Be sure to introduce yourself in DC.
Sam Edwards said
Thanks for the Firefox user agent info. Will most definitely introduce myself in DC. Until then, I’ll just keep checking turbomanage 🙂 Happy Holidays!
Sam Edwards said
Was great meeting you and hearing all the good stuff about GWT and App Engine tonight at the GTUG meeting in DC tonight. Is there any way to get a copy of the slides you presented? Thank you!
David Chandler said
Thanks, Sam. The slides were so fresh I haven’t gotten publication approval yet, will post back as soon as I do.
David Chandler said
GWT slides are now up:
http://www.slideshare.net/turbomanage/secrets-of-the-gwt
On Wed, Jan 19, 2011 at 12:03 AM, David Chandler wrote:
> Thanks, Sam. The slides were so fresh I haven’t gotten publication approval > yet, will post back as soon as I do. > >
Social App Dev » Blog Archive » Speeding up GWT Compilation for Testing said
[…] property for the browser you will be testing with. David Chandler shared this tip on his blog: turbomanage.wordpress.com. Â Using this will limit the number of permutations of the compilation that are […]