Better proguard rules to enable r8 minification

This commit is contained in:
Yair Morgenstern
2024-12-30 11:10:02 +02:00
parent 70068939ed
commit 4ec7b07040
2 changed files with 13 additions and 3 deletions

View File

@ -26,8 +26,18 @@
-dontwarn com.badlogic.gdx.utils.GdxBuild
-dontwarn com.badlogic.gdx.jnigen.BuildTarget*
-keep class com.badlogic.gdx.controllers.android.AndroidControllers
-keepclassmembers class com.badlogic.gdx.backends.android.AndroidInput* {
<init>(com.badlogic.gdx.Application, android.content.Context, java.lang.Object, com.badlogic.gdx.backends.android.AndroidApplicationConfiguration);
}
# You will need the next three lines if you use scene2d for UI or gameplay.
# If you don't use scene2d at all, you can remove or comment out the next line:
-keep public class com.badlogic.gdx.scenes.scene2d.** { *; }
# You will need the next two lines if you use BitmapFont or any scene2d.ui text:
-keep public class com.badlogic.gdx.graphics.g2d.BitmapFont { *; }
# You will probably need this line in most cases:
-keep public class com.badlogic.gdx.graphics.Color { *; }
# These two lines are used with mapping files; see https://developer.android.com/build/shrink-code#retracing
-keepattributes LineNumberTable,SourceFile
-renamesourcefileattribute SourceFile

View File

@ -10,7 +10,7 @@ import com.unciv.models.ruleset.Ruleset
*/
interface IPreviousScreen {
val gameSetupInfo: GameSetupInfo
var stage: Stage
val stage: Stage
val ruleset: Ruleset
// Having `fun setRightSideButtonEnabled(boolean: Boolean)` part of this interface gives a warning: