gpt4 book ai didi

java - 如何混淆 ProGuard 中的库 jar?

转载 作者:搜寻专家 更新时间:2023-11-01 01:43:59 25 4
gpt4 key购买 nike

我有一个 jar,它使用另一个 jar 作为库。我希望它们都被混淆。
引用 ProGuard documentation :

ProGuard requires the library jars (or wars, ears, zips, or directories) of the input jars to be specified. These are essentially the libraries that you would need for compiling the code. ProGuard uses them to reconstruct the class dependencies that are necessary for proper processing. The library jars themselves always remain unchanged. You should still put them in the class path of your final application.

如何改变这种行为?

更新:
我无法使用增量混淆,因为我不知道将什么指定为库 jar 的入口点。

最佳答案

您只需将两个 jar 指定为输入 jar (使用选项 -injars)。然后他们都会被混淆。任何其他 jar,例如运行时 jar,都是库 jar(用选项 -libraryjars 指定)。 ProGuard 需要它们来正确处理您的代码,但它让它们保持不变。

关于java - 如何混淆 ProGuard 中的库 jar?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17702013/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com