v0.7.2b: adjusted R8 rules and added comments explaining R8
This commit is contained in:
parent
647cab2306
commit
c8e7a4bb42
|
@ -17,9 +17,14 @@ android {
|
||||||
versionNameSuffix '-INDEV'
|
versionNameSuffix '-INDEV'
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
|
||||||
|
//These lines enable R8, which is a code shrinker/optimizer/obfuscator.
|
||||||
|
//This makes release APKs smaller and more efficient, but also makes debugging trickier
|
||||||
|
//as the information produced in stack traces must be de-obfuscated.
|
||||||
|
//See here: https://developer.android.com/studio/build/shrink-code#decode-stack-trace
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
9
core/proguard-rules.pro
vendored
9
core/proguard-rules.pro
vendored
|
@ -1,5 +1,8 @@
|
||||||
# retain these to support class references and meaningful stack traces
|
# retain these to support class references for the bundling and translation systems
|
||||||
-keepnames class com.shatteredpixel.** { *; }
|
-keepnames class com.shatteredpixel.** { *; }
|
||||||
-keepnames class com.watabou.** { *; }
|
-keepnames class com.watabou.** { *; }
|
||||||
-keep class com.shatteredpixel.shatteredpixeldungeon { *; }
|
|
||||||
-keep class com.watabou.noosa.game { *; }
|
# retained to support meaningful stack traces
|
||||||
|
# note that the mapping file must be referenced in order to make sense of line numbers
|
||||||
|
# mapping file can be found in core/build/outputs/mapping after running a release build
|
||||||
|
-keepattributes SourceFile,LineNumberTable
|
Loading…
Reference in New Issue
Block a user