VERY experimental Nintendo Switch 2 emulator
C++
android: Enable code minification
Charles Lombardo0ee7e74fb8cc
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.ktsindex d8ef02ac13..bf6d420429 100644--- a/src/android/app/build.gradle.kts+++ b/src/android/app/build.gradle.kts@@ -78,6 +78,12 @@ android {// Signed by release key, allowing for upload to Play Store.release {signingConfig = signingConfigs.getByName("debug")+ isMinifyEnabled = true+ isDebuggable = false+ proguardFiles(+ getDefaultProguardFile("proguard-android.txt"),+ "proguard-rules.pro"+ )}// builds a release build that doesn't need signing@@ -86,7 +92,6 @@ android {initWith(getByName("release"))versionNameSuffix = "-debug"signingConfig = signingConfigs.getByName("debug")- isMinifyEnabled = falseenableAndroidTestCoverage = falseisDebuggable = trueisJniDebuggable = truediff --git a/src/android/app/proguard-rules.pro b/src/android/app/proguard-rules.proindex f1b424510d..2f695757c0 100644--- a/src/android/app/proguard-rules.pro+++ b/src/android/app/proguard-rules.pro@@ -1,21 +1,2 @@-# Add project specific ProGuard rules here.-# You can control the set of applied configuration files using the-# proguardFiles setting in build.gradle.-#-# For more details, see-# http://developer.android.com/guide/developing/tools/proguard.html--# If your project uses WebView with JS, uncomment the following-# and specify the fully qualified class name to the JavaScript interface-# 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+# To get usable stack traces+-dontobfuscatediff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.ktindex 1e654777ae..cd9bc9ef0e 100644--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt@@ -11,6 +11,7 @@ import android.text.method.LinkMovementMethodimport android.view.Surfaceimport android.view.Viewimport android.widget.TextView+import androidx.annotation.Keepimport androidx.fragment.app.DialogFragmentimport com.google.android.material.dialog.MaterialAlertDialogBuilderimport org.yuzu.yuzu_emu.YuzuApplication.Companion.appContext@@ -53,6 +54,7 @@ object NativeLibrary {}}+ @Keep@JvmStaticfun openContentUri(path: String?, openmode: String?): Int {return if (isNativePath(path!!)) {@@ -60,6 +62,7 @@ object NativeLibrary {} else openContentUri(appContext, path, openmode)}+ @Keep@JvmStaticfun getSize(path: String?): Long {return if (isNativePath(path!!)) {@@ -340,6 +343,7 @@ object NativeLibrary {return coreErrorAlertResult}+ @Keep@JvmStaticfun exitEmulationActivity(resultCode: Int) {val Success = 0diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard.ktindex e6485d039b..82a6712b68 100644--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard.kt+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard.kt@@ -10,12 +10,14 @@ import android.view.KeyEventimport android.view.Viewimport android.view.WindowInsetsimport android.view.inputmethod.InputMethodManager+import androidx.annotation.Keepimport androidx.core.view.ViewCompatimport org.yuzu.yuzu_emu.NativeLibraryimport org.yuzu.yuzu_emu.Rimport org.yuzu.yuzu_emu.applets.keyboard.ui.KeyboardDialogFragmentimport java.io.Serializable+@Keepobject SoftwareKeyboard {lateinit var data: KeyboardDataval dataLock = Object()@@ -91,6 +93,7 @@ object SoftwareKeyboard {Cancel}+ @Keepdata class KeyboardConfig(var ok_text: String? = null,var header_text: String? = null,@@ -113,5 +116,6 @@ object SoftwareKeyboard {) : Serializable// Corresponds to Frontend::KeyboardData+ @Keepdata class KeyboardData(var result: Int, var text: String)}diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/disk_shader_cache/DiskShaderCacheProgress.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/disk_shader_cache/DiskShaderCacheProgress.ktindex 9b665c7a08..3b1559c805 100644--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/disk_shader_cache/DiskShaderCacheProgress.kt+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/disk_shader_cache/DiskShaderCacheProgress.kt@@ -3,10 +3,12 @@package org.yuzu.yuzu_emu.disk_shader_cache+import androidx.annotation.Keepimport org.yuzu.yuzu_emu.NativeLibraryimport org.yuzu.yuzu_emu.Rimport org.yuzu.yuzu_emu.disk_shader_cache.ui.ShaderProgressDialogFragment+@Keepobject DiskShaderCacheProgress {val finishLock = Object()private lateinit var fragment: ShaderProgressDialogFragment