Upgrade to Gradle 9, Kotlin 2.3.0, update dependencies

This commit is contained in:
KeatonTheBot
2026-01-23 19:48:34 -06:00
parent 6a59302104
commit d7770e2582
6 changed files with 46 additions and 44 deletions
+14 -26
View File
@@ -1,6 +1,6 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.plugin.compose'
}
android {
@@ -37,13 +37,8 @@ android {
buildTypes {
release {
postprocessing {
removeUnusedCode false
removeUnusedResources true
obfuscate false
optimizeCode true
proguardFiles 'proguard-rules.pro'
}
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
debuggable false
jniDebuggable false
@@ -53,18 +48,11 @@ android {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
kotlinOptions {
jvmTarget = '21'
freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn", "-Xallow-jvm-ir-dependencies"]
}
buildFeatures {
compose true
prefab true
buildConfig true
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.15'
}
packagingOptions {
jniLibs {
keepDebugSymbols += '**/libkenjinx.so'
@@ -77,7 +65,7 @@ android {
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
version '3.22.1'
version '4.2.1'
}
}
@@ -94,7 +82,7 @@ tasks.named("preBuild") {
dependencies {
runtimeOnly project(":libkenjinx")
implementation 'androidx.activity:activity-compose:1.10.1'
implementation 'androidx.activity:activity-compose:1.12.2'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material:material-icons-extended:1.7.8'
@@ -103,28 +91,28 @@ dependencies {
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.core:core-ktx:1.17.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.9.1'
implementation 'androidx.navigation:navigation-compose:2.9.3'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.10.0'
implementation 'androidx.navigation:navigation-compose:2.9.6'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'br.com.devsrsouza.compose.icons:css-gg:1.1.1'
implementation 'com.anggrayudi:storage:1.5.6'
implementation 'com.anggrayudi:storage:2.2.0'
implementation 'com.github.swordfish90:radialgamepad:2.0.0'
implementation 'com.google.android.material:material:1.13.0'
implementation 'com.google.code.gson:gson:2.13.1'
implementation 'com.google.code.gson:gson:2.13.2'
implementation 'com.halilibo.compose-richtext:richtext-commonmark:0.20.0'
implementation 'com.halilibo.compose-richtext:richtext-ui-material3:0.20.0'
implementation 'com.halilibo.compose-richtext:richtext-ui:0.20.0'
implementation 'io.coil-kt:coil-compose:2.7.0'
implementation 'net.java.dev.jna:jna:5.17.0@aar'
implementation 'net.java.dev.jna:jna:5.18.1@aar'
implementation 'net.lingala.zip4j:zip4j:2.11.5'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0'
implementation platform('androidx.compose:compose-bom:2024.08.00')
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2'
implementation platform('androidx.compose:compose-bom:2026.01.00')
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.9.25')
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
androidTestImplementation platform('androidx.compose:compose-bom:2024.08.00')
androidTestImplementation platform('androidx.compose:compose-bom:2026.01.00')
testImplementation 'junit:junit:4.13.2'
debugImplementation 'androidx.compose.ui:ui-test-manifest'
debugImplementation 'androidx.compose.ui:ui-tooling'
+1
View File
@@ -13,6 +13,7 @@
-repackageclasses ''
-keepattributes Exceptions,InnerClasses,Signature,*Annotation*
-dontpreverify
-keep class ** { *; }
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
@@ -82,11 +82,23 @@ class HomeViewModel(
thread {
try {
for (file in folder.search(true, DocumentFileType.FILE)) {
if (file.extension == "xci" || file.extension == "nsp" || file.extension == "nro")
activity.let {
loadedCache.add(GameModel(file, it))
val validExtensions = setOf("xci", "nsp", "nro")
val queue = mutableListOf(folder)
while (queue.isNotEmpty()) {
val current = queue.removeAt(0)
current.listFiles().forEach { file ->
when {
file.isFile && file.extension?.lowercase() in validExtensions -> {
val game = GameModel(file, activity)
if(!game.isUnknown()) {
loadedCache.add(game)
}
}
file.isDirectory -> queue.add(file)
}
}
}
loadedCache.sortWith { itemA, itemB ->
@@ -4,9 +4,7 @@ import android.content.SharedPreferences
import androidx.compose.runtime.MutableState
import androidx.documentfile.provider.DocumentFile
import androidx.preference.PreferenceManager
import com.anggrayudi.storage.callback.FileCallback
import com.anggrayudi.storage.file.FileFullPath
import com.anggrayudi.storage.file.copyFileTo
import com.anggrayudi.storage.file.extension
import com.anggrayudi.storage.file.getAbsolutePath
import com.anggrayudi.storage.file.openInputStream
@@ -286,16 +284,18 @@ class SettingsViewModel(val activity: MainActivity) {
installState.value = KeyInstallState.Install
thread {
Thread.sleep(1000)
this.copyFileTo(
activity,
outputFolder,
callback = object : FileCallback() {
override fun onCompleted(result: Any) {
KenjinxNative.deviceReloadFilesystem()
installState.value = KeyInstallState.Done
try {
this.openInputStream(activity)?.use { input ->
outputFile.outputStream().use { output ->
input.copyTo(output)
}
}
)
KenjinxNative.deviceReloadFilesystem()
installState.value = KeyInstallState.Done
} catch (e: Exception) {
installState.value = KeyInstallState.Cancelled
}
}
}
}