How can I check/upgrade Proguard version when using it in Eclipse for Android development?
Asked Answered
B

3

32

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.

Bessiebessy answered 16/2, 2011 at 6:24 Comment(0)
P
58

The ProGuard jar is located inside the 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.

Primus answered 16/2, 2011 at 22:59 Comment(2)
Actually when I replace the entire directory, it can no longer find proguard-android.txtMopboard
Please be aware that upgrading your SDK to a greater version (via the SDK manager) will reset your tools directory and, therefore, reset your proguard version to the one Android uses (version 4.7 from July 2011 is shipped with API 19)Suntan
F
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

Fermat answered 8/12, 2011 at 12:41 Comment(0)
H
1

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

buildscript {
    configurations.all {
        resolutionStrategy {
            force 'net.sf.proguard:proguard-gradle:5.3.2'
        }
    }
}
Himyaritic answered 14/3, 2017 at 13:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.