Friday, September 30, 2016

Using Constants based on Environment


I have a client side configuration file, in which I store some client properties for the application.

I use this file as:
key = xyz
public interface Config
extends Constants {

String key();

Now, I want to have 2 versions of this, for dev and production environments.

I differentiate between the environments using the custom properties in different *.gwt.xml files:
<set-property name="env" value="dev"/>
<set-property name="env" value="prod"/>

How can I use 2 versions of the properties ( and file mapped to the same Java class (

I tried doing it with localization (via setting locale property), but I get other localization stuff with it that I don't need.


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
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment