更新时间:2023-12-03 22:36:10
今天没有任何东西可用:
最后,我自己写了一段简单的代码,只取出所有的空白,但保留了JSNI代码并保持原样。不会混淆方法变量或其他任何东西,但它现在必须做。
Most obfuscation focuses on bytecode. I have to supply the source code too as that is what a GWT compiler an external developer would use needs to run. Before releasing the source code I need to clean it up a bit:
Alternatively to the above all comments and all Javadoc could be removed (licence still needed at the top of each file) and I'd generate Javadoc separately.
I have not found a way that I could be sure would work nicely from within a gradle build script executed on multiple platforms. Some very old and no longer maintained solutions may have trouble with Java enhancements such as diamond operators and lambdas.
Are there any recommendations as to how I could do this?
Note that there are many questions like this unanswered here. One of them: GWT Java Obfuscation
Nothing appears to be available for this TODAY:
In the end, I wrote a simple bit of code myself that only takes out all the whitespace but leaves the JSNI code in and untouched. It does not obfuscate method variables or anything else but it will have to do for now.