diff --git a/README.md b/README.md index 049cf877..75d47f4a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/ucrop/build.gradle b/ucrop/build.gradle index c3c05fc7..be236ab6 100644 --- a/ucrop/build.gradle +++ b/ucrop/build.gradle @@ -8,7 +8,7 @@ android { targetSdkVersion 33 versionCode 27 versionName "2.2.9-native" - + consumerProguardFiles 'proguard-rules.pro' vectorDrawables.useSupportLibrary = true } buildTypes { diff --git a/ucrop/proguard-rules.pro b/ucrop/proguard-rules.pro index 0cd55489..d9b0d84a 100644 --- a/ucrop/proguard-rules.pro +++ b/ucrop/proguard-rules.pro @@ -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** { *; } \ No newline at end of file