Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Enable ProGuard #1650

Merged
merged 4 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ android {
}
buildTypes {
release {
shrinkResources false
minifyEnabled false
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
Expand Down
23 changes: 23 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# These packages are referenced by ReVanced Patches
-keep class app.revanced.patcher.** { *; }
-keep class com.android.tools.smali.** { *; }
-keep class kotlin.** { *; }
-keepnames class com.google.common.collect.**

# This package uses reflection internally, so do not remove and rename
-keep class com.android.apksig.internal.** { *; }

# Fix crash
-keepnames class org.xmlpull.** { *; }

# Fix build errors
-dontwarn java.awt.**
-dontwarn javax.**
-dontwarn com.google.j2objc.annotations.*
1 change: 0 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.caching=true
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false