Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

disable gwt obfuscation for certain model classes

Is it possible in GWT 2.4+ to disable obfuscation for certain java model classes?

The reason I am asking this question is we use GWT RPC to talk to the server and need to store these objects returned etc in local storage using the Indexed DB API, we are currently using websql api. If GWT obfuscates/renames your properties etc then this renders using the Indexed DB API useless in your code.

Maybe there is a way to ask GWT to replace a property string with the obfuscated version in your Indexed DB api queries?

I could create a whole new java model that uses javascript overlays so these are preserved when GWT compiled and replace GWT RPC with JSON RPC but this would be a lot of work.

Any other ideas would be appreciated!

I also looked at the AutoBean framework which produces nice JSON output of your model interfaces but I don't think has a nice simple javascript representation under the hood.

like image 304
paul Avatar asked Feb 21 '13 09:02

paul


1 Answers

You can set GWT Compile style attribute to PRETTY or DETAILED. so that GWT will not replace the class, method or variable names. For more information refer this link.

like image 61
Adarsha Avatar answered Oct 31 '22 11:10

Adarsha