如何在Eclipse for Android开发中使用它来检查/升级Proguard版本?

时间:2021-01-05 07:00:55

The documentation on this is extremely poor. I understand that ProGuard can be enabled by manually editing "default.properties" in the project's rot directory. And all the settings go into the "proguard.cfg" file in the same place, but I'd like to know which version of ProGuard is being used (I'm using Eclise Indigo). I would also like to be able to upgrade it to the latest versions whenever the are released. But I can't find any reference on how to do it.

关于这方面的文件非常差。我知道可以通过在项目的rot目录中手动编辑“default.properties”来启用ProGuard。所有的设置都放在同一个地方的“proguard.cfg”文件中,但我想知道正在使用哪个版本的ProGuard(我正在使用Eclise Indigo)。我还希望能够在发布时将其升级到最新版本。但我找不到任何关于如何做的参考。

3 个解决方案

#1


52  

The ProGuard jar is located inside the Android SDK: android-sdk/tools/proguard/lib/proguard.jar

ProGuard jar位于Android SDK内:android-sdk / tools / proguard / lib / proguard.jar

You can print out its version number with

您可以打印出其版本号

java -jar android-sdk/tools/proguard/lib/proguard.jar

(with the proper path). If necessary, you can replace the jar (actually, the entire proguard subdirectory) with the latest version from the download page at the official ProGuard site.

(有正确的道路)。如有必要,您可以使用官方ProGuard站点的下载页面中的最新版本替换jar(实际上,整个proguard子目录)。

#2


9  

For the visually inclined, the version of Proguard can also be checked by double clicking on proguardgui.jar in ...\android-sdk\tools\proguard\lib

对于视觉上的倾斜,也可以通过双击... \ android-sdk \ tools \ proguard \ lib中的proguardgui.jar来检查Proguard的版本。

#3


0  

Quoting my own answer from over here, you can override the ProGuard version like so:

从这里引用我自己的答案,您可以像这样覆盖ProGuard版本:

buildscript {
    configurations.all {
        resolutionStrategy {
            force 'net.sf.proguard:proguard-gradle:5.3.2'
        }
    }
}

#1


52  

The ProGuard jar is located inside the Android SDK: android-sdk/tools/proguard/lib/proguard.jar

ProGuard jar位于Android SDK内:android-sdk / tools / proguard / lib / proguard.jar

You can print out its version number with

您可以打印出其版本号

java -jar android-sdk/tools/proguard/lib/proguard.jar

(with the proper path). If necessary, you can replace the jar (actually, the entire proguard subdirectory) with the latest version from the download page at the official ProGuard site.

(有正确的道路)。如有必要,您可以使用官方ProGuard站点的下载页面中的最新版本替换jar(实际上,整个proguard子目录)。

#2


9  

For the visually inclined, the version of Proguard can also be checked by double clicking on proguardgui.jar in ...\android-sdk\tools\proguard\lib

对于视觉上的倾斜,也可以通过双击... \ android-sdk \ tools \ proguard \ lib中的proguardgui.jar来检查Proguard的版本。

#3


0  

Quoting my own answer from over here, you can override the ProGuard version like so:

从这里引用我自己的答案,您可以像这样覆盖ProGuard版本:

buildscript {
    configurations.all {
        resolutionStrategy {
            force 'net.sf.proguard:proguard-gradle:5.3.2'
        }
    }
}