enable package optimizations

This commit is contained in:
qimiko committed 2024-02-20 02:30:35 -07:00
1 parent 2d4a027001
commit 1b136cd4e9
4 files changed
+17 -22

No files matched your search

+7 -2
View File
@@ -46,8 +46,13 @@ android {
buildTypes { buildTypes {
release { release {
isMinifyEnabled = false isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
} }
} }
compileOptions { compileOptions {
+6 -20
View File
@@ -1,21 +1,7 @@
# Add project specific ProGuard rules here. # Add wildcard keep rules to all of the library code in use
# You can control the set of applied configuration files using the -keep class org.fmod.** { *; }
# proguardFiles setting in build.gradle. -keep class org.cocos2dx.lib.** { *; }
# -keep class com.customRobTop.** { *; }
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following # note: if you're going to add more rules, consider the @Keep annotation
# and specify the fully qualified class name to the JavaScript interface # this should really only be kept to non-custom code
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -1,7 +1,9 @@
package com.geode.launcher package com.geode.launcher
import androidx.annotation.Keep
import com.geode.launcher.utils.Constants import com.geode.launcher.utils.Constants
@Keep
object LauncherFix { object LauncherFix {
fun loadLibrary() { fun loadLibrary() {
System.loadLibrary(Constants.LAUNCHER_FIX_LIB_NAME) System.loadLibrary(Constants.LAUNCHER_FIX_LIB_NAME)
@@ -16,6 +16,7 @@ import android.util.Log
import android.widget.Toast import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.Keep
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.documentfile.provider.DocumentFile import androidx.documentfile.provider.DocumentFile
@@ -29,6 +30,7 @@ import java.io.File
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
import kotlin.system.exitProcess import kotlin.system.exitProcess
@Keep
@Suppress("unused", "KotlinJniMissingFunction") @Suppress("unused", "KotlinJniMissingFunction")
object GeodeUtils { object GeodeUtils {
private lateinit var activity: WeakReference<AppCompatActivity> private lateinit var activity: WeakReference<AppCompatActivity>