可以在Grails中使用proguard [英] Is it possible to use proguard with Grails
问题描述
即使无法在整个grails应用程序中使用proguard,也可以仅将其用于src/java文件夹吗?
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?
推荐答案
我不了解Proguard或Grails,但我确实知道:
I don't know either Proguard or Grails in depth, but I do know that:
- Grails使用Groovy
- Groovy编译为字节码
- Proguard 对字节码进行操作(不是源代码)
- Grails uses Groovy
- Groovy compiles down to bytecode
- Proguard operates on bytecode (not source code)
因此,我的直觉是肯定的,ProGuard可以缩小/模糊Grails应用程序.您的问题询问有关在src/java文件夹上使用ProGuard的问题.重要的是要了解ProGuard是在.class文件而不是.java文件上运行的.正确的配置将需要在您的bin目录而不是src上进行操作.不幸的是,我没有资格为您提供详细的示例配置,但是我希望这可以使您走上正确的道路.
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.
这篇关于可以在Grails中使用proguard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!