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

Optimize confusion rules #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig = signingConfigs.debug
}
}

Expand Down
12 changes: 12 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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 <methods>;
}
-keep class top.canyie.pine.examples.test.DynamicLookupJNITest{
native <methods>;
}

-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{*;}
2 changes: 1 addition & 1 deletion core/consumer-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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 <methods>;
}
2 changes: 1 addition & 1 deletion enhances/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pine Enhances
-keep class top.canyie.pine.enhances.PineEnhances {
private static void onClassInit(long);
native<methods>;
}