You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* It renames the remaining classes, fields, and methods using short
58
58
meaningless names.
59
59
60
-
The resulting applications and libraries are smaller, faster, and a bit better
61
-
hardened against reverse engineering. ProGuard is very popular for Android
62
-
development, but it also works for Java code in general.
60
+
The resulting applications and libraries are smaller and faster.
63
61
64
62
## ❓ Getting Help
65
63
If you have **usage or general questions** please ask them in the <ahref="https://community.guardsquare.com/?utm_source=github&utm_medium=site-link&utm_campaign=github-community">**Guardsquare Community**.</a>
@@ -69,129 +67,79 @@ Please use <a href="https://github.com/guardsquare/proguard/issues">**the issue
69
67
70
68
## 🚀 Quick Start
71
69
72
-
ProGuard has its own Gradle plugin, allowing you to shrink, optimize and obfuscate Android projects.
70
+
### Command line
73
71
74
-
### ProGuard Gradle Plugin
72
+
First, download the latest release from [GitHub releases](https://github.com/Guardsquare/proguard/releases).
75
73
76
-
You can apply the ProGuard Gradle plugin in AGP 4+ projects by following these steps:
74
+
To run ProGuard, on Linux/MacOS, just type:
77
75
78
-
1. Add a `classpath` dependency in your root level `build.gradle` file:
79
-
80
-
```Groovy
81
-
buildscript {
82
-
repositories {
83
-
google() // For the Android Gradle plugin.
84
-
mavenCentral() // For the ProGuard Gradle Plugin and anything else.
85
-
}
86
-
dependencies {
87
-
classpath 'com.android.tools.build:gradle:x.y.z' // The Android Gradle plugin.
88
-
classpath 'com.guardsquare:proguard-gradle:7.3.0' // The ProGuard Gradle plugin.
89
-
}
90
-
}
76
+
```bash
77
+
bin/proguard.sh <options...>
91
78
```
92
79
93
-
2. Apply the `proguard` plugin after applying the Android Gradle plugin as shown below:
80
+
or on Windows:
94
81
95
-
```Groovy
96
-
apply plugin: 'com.android.application'
97
-
apply plugin: 'com.guardsquare.proguard'
98
82
```
99
-
100
-
3. ProGuard expects unobfuscated class files as input. Therefore, other obfuscators such as R8 have to be disabled.
101
-
102
-
```Groovy
103
-
android {
104
-
...
105
-
buildTypes {
106
-
release {
107
-
// Deactivate R8.
108
-
minifyEnabled false
109
-
}
110
-
}
111
-
}
83
+
bin\proguard <options...>
112
84
```
113
85
114
-
4. Configure variants to be processed with ProGuard using the `proguard` block:
115
-
116
-
```Groovy
117
-
android {
118
-
...
119
-
}
86
+
Typically, you'll put most options in a configuration file (say,
0 commit comments