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

不打扰是莪最后的温柔 提交于 2019-12-21 05:44:08

问题


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?


回答1:


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).




回答2:


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 "-".



来源:https://stackoverflow.com/questions/11772627/gwt-cssresource-style-possible-values-how-to-turn-obfuscation-on

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!