diff --git a/app/build.gradle b/app/build.gradle index 9d9bc8b..c9258cb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -27,8 +27,9 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + signingConfig = signingConfigs.debug } } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index f1b4245..e6da7bd 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -19,3 +19,15 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + +-keep class top.canyie.pine.examples.test.DirectRegisterJNITest{ + native ; +} +-keep class top.canyie.pine.examples.test.DynamicLookupJNITest{ + native ; +} + +-keep class * extends top.canyie.pine.examples.test.Test{*;} +-keep class top.canyie.pine.examples.test.Test{*;} +-keep class top.canyie.pine.examples.test.ConstructorTest$Target{*;} +-keep class top.canyie.pine.examples.test.NotInitedTest$I{*;} diff --git a/core/consumer-rules.pro b/core/consumer-rules.pro index 601fb5a..d61c3bc 100644 --- a/core/consumer-rules.pro +++ b/core/consumer-rules.pro @@ -19,6 +19,6 @@ } # Prevent R8 from removing "unused" library native methods while they're still being used --keep class * { +-keep class top.canyie.pine.Pine { native ; } diff --git a/enhances/consumer-rules.pro b/enhances/consumer-rules.pro index 07281e6..e36e51d 100644 --- a/enhances/consumer-rules.pro +++ b/enhances/consumer-rules.pro @@ -1,4 +1,4 @@ # Pine Enhances -keep class top.canyie.pine.enhances.PineEnhances { - private static void onClassInit(long); + native; }