android: Enable code minification
This commit is contained in:
parent
921e6dddcc
commit
d57ae50f17
|
@ -78,6 +78,12 @@ android {
|
||||||
// Signed by release key, allowing for upload to Play Store.
|
// Signed by release key, allowing for upload to Play Store.
|
||||||
release {
|
release {
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
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
|
// builds a release build that doesn't need signing
|
||||||
|
@ -86,7 +92,6 @@ android {
|
||||||
initWith(getByName("release"))
|
initWith(getByName("release"))
|
||||||
versionNameSuffix = "-debug"
|
versionNameSuffix = "-debug"
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
isMinifyEnabled = false
|
|
||||||
enableAndroidTestCoverage = false
|
enableAndroidTestCoverage = false
|
||||||
isDebuggable = true
|
isDebuggable = true
|
||||||
isJniDebuggable = true
|
isJniDebuggable = true
|
||||||
|
|
|
@ -1,21 +1,2 @@
|
||||||
# Add project specific ProGuard rules here.
|
# To get usable stack traces
|
||||||
# You can control the set of applied configuration files using the
|
-dontobfuscate
|
||||||
# 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
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import android.text.method.LinkMovementMethod
|
||||||
import android.view.Surface
|
import android.view.Surface
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
import androidx.annotation.Keep
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import org.yuzu.yuzu_emu.YuzuApplication.Companion.appContext
|
import org.yuzu.yuzu_emu.YuzuApplication.Companion.appContext
|
||||||
|
@ -53,6 +54,7 @@ object NativeLibrary {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun openContentUri(path: String?, openmode: String?): Int {
|
fun openContentUri(path: String?, openmode: String?): Int {
|
||||||
return if (isNativePath(path!!)) {
|
return if (isNativePath(path!!)) {
|
||||||
|
@ -60,6 +62,7 @@ object NativeLibrary {
|
||||||
} else openContentUri(appContext, path, openmode)
|
} else openContentUri(appContext, path, openmode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun getSize(path: String?): Long {
|
fun getSize(path: String?): Long {
|
||||||
return if (isNativePath(path!!)) {
|
return if (isNativePath(path!!)) {
|
||||||
|
@ -340,6 +343,7 @@ object NativeLibrary {
|
||||||
return coreErrorAlertResult
|
return coreErrorAlertResult
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun exitEmulationActivity(resultCode: Int) {
|
fun exitEmulationActivity(resultCode: Int) {
|
||||||
val Success = 0
|
val Success = 0
|
||||||
|
|
|
@ -10,12 +10,14 @@ import android.view.KeyEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.WindowInsets
|
import android.view.WindowInsets
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
|
import androidx.annotation.Keep
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import org.yuzu.yuzu_emu.NativeLibrary
|
import org.yuzu.yuzu_emu.NativeLibrary
|
||||||
import org.yuzu.yuzu_emu.R
|
import org.yuzu.yuzu_emu.R
|
||||||
import org.yuzu.yuzu_emu.applets.keyboard.ui.KeyboardDialogFragment
|
import org.yuzu.yuzu_emu.applets.keyboard.ui.KeyboardDialogFragment
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
|
||||||
|
@Keep
|
||||||
object SoftwareKeyboard {
|
object SoftwareKeyboard {
|
||||||
lateinit var data: KeyboardData
|
lateinit var data: KeyboardData
|
||||||
val dataLock = Object()
|
val dataLock = Object()
|
||||||
|
@ -91,6 +93,7 @@ object SoftwareKeyboard {
|
||||||
Cancel
|
Cancel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
data class KeyboardConfig(
|
data class KeyboardConfig(
|
||||||
var ok_text: String? = null,
|
var ok_text: String? = null,
|
||||||
var header_text: String? = null,
|
var header_text: String? = null,
|
||||||
|
@ -113,5 +116,6 @@ object SoftwareKeyboard {
|
||||||
) : Serializable
|
) : Serializable
|
||||||
|
|
||||||
// Corresponds to Frontend::KeyboardData
|
// Corresponds to Frontend::KeyboardData
|
||||||
|
@Keep
|
||||||
data class KeyboardData(var result: Int, var text: String)
|
data class KeyboardData(var result: Int, var text: String)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
|
|
||||||
package org.yuzu.yuzu_emu.disk_shader_cache
|
package org.yuzu.yuzu_emu.disk_shader_cache
|
||||||
|
|
||||||
|
import androidx.annotation.Keep
|
||||||
import org.yuzu.yuzu_emu.NativeLibrary
|
import org.yuzu.yuzu_emu.NativeLibrary
|
||||||
import org.yuzu.yuzu_emu.R
|
import org.yuzu.yuzu_emu.R
|
||||||
import org.yuzu.yuzu_emu.disk_shader_cache.ui.ShaderProgressDialogFragment
|
import org.yuzu.yuzu_emu.disk_shader_cache.ui.ShaderProgressDialogFragment
|
||||||
|
|
||||||
|
@Keep
|
||||||
object DiskShaderCacheProgress {
|
object DiskShaderCacheProgress {
|
||||||
val finishLock = Object()
|
val finishLock = Object()
|
||||||
private lateinit var fragment: ShaderProgressDialogFragment
|
private lateinit var fragment: ShaderProgressDialogFragment
|
||||||
|
|
Reference in New Issue