mirror of
https://github.com/izzy2lost/PSX2.git
synced 2026-07-05 15:18:36 -07:00
better stabilty
This commit is contained in:
+24
-19
@@ -11,8 +11,8 @@ android {
|
||||
applicationId = "com.izzy2lost.psx2"
|
||||
minSdk = 26
|
||||
targetSdk = 36
|
||||
versionCode 10
|
||||
versionName "1.0.8"
|
||||
versionCode 12
|
||||
versionName "1.1.0"
|
||||
// APK
|
||||
base.archivesName = "PSX2_${versionCode}_${new Date().format('yyyyMMddHHmm')}"
|
||||
|
||||
@@ -43,6 +43,23 @@ android {
|
||||
debugSymbolLevel 'SYMBOL_TABLE'
|
||||
}
|
||||
}
|
||||
debug {
|
||||
minifyEnabled = false
|
||||
shrinkResources = false
|
||||
debuggable = true
|
||||
}
|
||||
}
|
||||
|
||||
bundle {
|
||||
language {
|
||||
enableSplit = false
|
||||
}
|
||||
density {
|
||||
enableSplit = false
|
||||
}
|
||||
abi {
|
||||
enableSplit = true
|
||||
}
|
||||
}
|
||||
// Relax lint for test release builds
|
||||
lint {
|
||||
@@ -63,29 +80,17 @@ android {
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
useLegacyPackaging = true
|
||||
keepDebugSymbols += ['**/*.so']
|
||||
}
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
}
|
||||
buildToolsVersion = '36.0.0'
|
||||
}
|
||||
|
||||
tasks.register('bumpVersion') {
|
||||
doLast {
|
||||
def buildFile = file('build.gradle')
|
||||
def buildContent = buildFile.text
|
||||
def versionPattern = /versionCode (\d+)/
|
||||
def matcher = buildContent =~ versionPattern
|
||||
|
||||
if (matcher.find()) {
|
||||
def currentVersion = Integer.parseInt(matcher[0][1])
|
||||
def newVersion = currentVersion + 1
|
||||
def newContent = buildContent.replaceFirst(versionPattern, "versionCode ${newVersion}")
|
||||
buildFile.text = newContent
|
||||
println "Version code bumped from ${currentVersion} to ${newVersion}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.1'
|
||||
|
||||
Vendored
+31
-15
@@ -1,13 +1,20 @@
|
||||
# PSX2 Emulator ProGuard Rules
|
||||
|
||||
# Keep native methods
|
||||
-keepclasseswithmembernames class * {
|
||||
# Keep native methods - CRITICAL for AAB
|
||||
-keepclasseswithmembernames,includedescriptorclasses class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
# Keep NativeApp class and all its methods (JNI interface)
|
||||
-keep class com.izzy2lost.psx2.NativeApp {
|
||||
# Keep NativeApp class and all its methods (JNI interface) - CRITICAL
|
||||
-keep,includedescriptorclasses class com.izzy2lost.psx2.NativeApp {
|
||||
public static <methods>;
|
||||
public <methods>;
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# Keep all static initializers that load native libraries
|
||||
-keepclassmembers class * {
|
||||
static <methods>;
|
||||
}
|
||||
|
||||
# Keep MainActivity for proper lifecycle
|
||||
@@ -15,8 +22,11 @@
|
||||
public <methods>;
|
||||
}
|
||||
|
||||
# Keep all classes that might be referenced from native code
|
||||
-keep class com.izzy2lost.psx2.** { *; }
|
||||
# Keep all classes that might be referenced from native code - CRITICAL for AAB
|
||||
-keep,includedescriptorclasses class com.izzy2lost.psx2.** { *; }
|
||||
|
||||
# Prevent obfuscation of classes used by native code
|
||||
-keepnames class com.izzy2lost.psx2.** { *; }
|
||||
|
||||
# Keep Glide for image loading
|
||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
@@ -31,14 +41,6 @@
|
||||
*** rewind();
|
||||
}
|
||||
|
||||
# Keep Material Design components
|
||||
-keep class com.google.android.material.** { *; }
|
||||
-keep interface com.google.android.material.** { *; }
|
||||
|
||||
# Keep AndroidX components
|
||||
-keep class androidx.** { *; }
|
||||
-keep interface androidx.** { *; }
|
||||
|
||||
# Remove logging in release builds
|
||||
-assumenosideeffects class android.util.Log {
|
||||
public static boolean isLoggable(java.lang.String, int);
|
||||
@@ -57,4 +59,18 @@
|
||||
|
||||
# Keep line numbers for crash reports
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
-renamesourcefileattribute SourceFile
|
||||
-renamesourcefileattribute SourceFile
|
||||
|
||||
|
||||
# AAB-specific rules to prevent crashes
|
||||
-dontwarn org.conscrypt.**
|
||||
-dontwarn org.bouncycastle.**
|
||||
-dontwarn org.openjsse.**
|
||||
|
||||
# Keep SDL classes if used
|
||||
-keep class org.libsdl.** { *; }
|
||||
|
||||
# Prevent stripping of native libraries in AAB
|
||||
-keepclasseswithmembers class * {
|
||||
public static native <methods>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user