dermoritz
dermoritz

Reputation: 13028

gwt "CssResource.style" possible values, how to turn obfuscation ON

Is there a documentation of gwt.xml, a list of the setting with all accepted values? In my case i turned css obfuscation off in debug/developer environment. But for Production environment i want to turn it on. The same i did with "gwt.enableDebugId" it is true in .gwt.xml and false in -production.gwt.xml - this is working fine. The same i want with "CssResource.style".

the only thing i found so far was the value "obf" but it seems that value also produces "human readable classes" see here for example. i tried this value but the names keep pretty.

the clarification demanded: this turns css obfuscation off:

<set-configuration-property name="CssResource.style" value="pretty"/>

but how to turn it on?

Upvotes: 3

Views: 2452

Answers (2)

Michael Laffargue
Michael Laffargue

Reputation: 10304

For those like me looking for all possible values, here is where to find them (at least in GWT 2.5.0) :

com.google.gwt.resources.rg.CssObfuscationStyle

pretty -->           VERBOSE (true, false, true, true),
stable -->           STABLE_FULL_CLASSNAME (true, true, true, true),
stable-shorttype --> STABLE_SHORT_CLASSNAME (true, true, true, false),
stable-notype -->    STABLE_NO_CLASSNAME (true, true, false, false),
[default] -->        OBFUSCATED (false, false, false, false);

boolean values stands for :

isPretty, isStable, showClassName, showPackageName

The only unclear value is isStable which will if set to false prefix your pretty name with the obfuscated name and a "-".

Upvotes: 9

Thomas Broyer
Thomas Broyer

Reputation: 64551

That configuration property is defined in com/google/gwt/ressources/Ressources.gwt.xml that way:

<define-configuration-property name="CssResource.style" is-multi-valued="false" />
<set-configuration-property name="CssResource.style" value="obf" />

I.e. the default value is obf. I believe obfuscate or obfuscated would work too (if you find them more readable).

Upvotes: 4

Related Questions