Skip to content

Commit

Permalink
Bundle proguard rules in AAR
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored May 18, 2023
1 parent 63dda2e commit 6236481
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@
}
}
```
5. You may want to add this to your PROGUARD config:

```
-dontwarn com.yalantis.ucrop**
-keep class com.yalantis.ucrop** { *; }
-keep interface com.yalantis.ucrop** { *; }
```
5. The specific rules are [already bundled](ucrop/proguard-rules.pro) into the aar which can be interpreted by R8 automatically.

# Customization

Expand Down
2 changes: 1 addition & 1 deletion ucrop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
targetSdkVersion 31
versionCode 26
versionName "2.2.8-native"

consumerProguardFiles 'proguard-rules.pro'
vectorDrawables.useSupportLibrary = true
}
buildTypes {
Expand Down
20 changes: 3 additions & 17 deletions ucrop/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/oleksii/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-dontwarn com.yalantis.ucrop**
-keep class com.yalantis.ucrop** { *; }
-keep interface com.yalantis.ucrop** { *; }

0 comments on commit 6236481

Please sign in to comment.