Even if it is not possible to use proguard for an entire grails app would it be possible to just use it for the src/java folder?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I don't know either Proguard or Grails in depth, but I do know that:
- Grails uses Groovy
- Groovy compiles down to bytecode
- Proguard operates on bytecode (not source code)
Thus my intuition is yes, ProGuard can shrink/obfuscate grails apps. Your question asks about using ProGuard on the src/java folder. It's important to understand that ProGuard operates on .class files, not .java files. A correct configuration will need to operate on your bin directory, not src. Unfortunately I'm not qualified to give you a detailed example configuration, but I hope this gets you on the right path.