Is it possible to use proguard with Grails

有些话、适合烂在心里 提交于 2020-01-04 05:20:14

问题


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:

  1. Grails uses Groovy
  2. Groovy compiles down to bytecode
  3. 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.



来源:https://stackoverflow.com/questions/9897426/is-it-possible-to-use-proguard-with-grails

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