Tuesday, November 29, 2011

Re: Don't compile for the MAC and IE* when developing.

You can create GWT modules for development/testing for each browser/rendering engine.

For example:

App.gwt.xml //your main app module ready for production
DevApp.gwt.xml //inherits App.gwt.xml but enables logging for development
DevAppSafari.gwt.xml //inherits DevApp.gwt.xml and sets user.agent property to safari (<set-property name="user.agent" value="safari />). This tells the GWT compiler to only compile for Safari/Chrome ( = WebKit browsers)
DevAppGecko.gwt.xml // same as DevAppSafari but with user.agent = gecko1_8 for Firefox.
....
....

Works pretty well. Just make sure to add the "rename-to" attribute from App.gwt.xml to all Dev*.gwt.xml modules so it compiles to the same directory. If your App.gwt.xml does not have such an attribute you also need to add it to all Dev*.gwt.xml modules and set it to the default name of your main app.

You can find a small paragraph about it in http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml . Take a look at "Renaming modules".

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/szT4c9Jlre8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment