Monday, May 2, 2016

Re: Using different .gwt.xml in super-dev-mode



On Monday, May 2, 2016 at 12:03:47 PM UTC+2, Luca Morettoni wrote:
Hi list! In a big project I need to use a different <module_name>.gwt.xml file because I'd like to disable some "memory consuming options" I have in that file, like:

<set-property name="compiler.stackMode" value="emulated"/>

My project is currently splitted in three different subproject (client, server and shared), and the client subproject uses two main configuration profiles: dev (the active by default) and production that is enabled only when we build the final war file.

My first idea is to have two different <client>/src/main/resources for dev and production, but I will prefer to know if there are any other possible solution for my config!

Starting with 2.8.0-beta1, you can set properties from the command-line with "-setProperty compiler.stackMode=emulated".
You could also use a conditional set-property so it's only set when in SDM (works in 2.7 and 2.6):

<set-property name="compiler.stackMode" value="emulated">
  <when-property-is name="superdevmode" value="on" />
</set-property>

If you need anything else though, you'd have to use a separate module. I see absolutely no problem doing so though, no reason to try to avoid it at all costs.
Also, you just need to have a module that <inherits/> your other module, uses the same rename-to="", and overrides what needs to be overridden; no need to use distinct resource folders!
See "renaming modules" in http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment