mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-20 17:51:13 +02:00
Upgrade to Gradle 9, Kotlin 2.3.0, update dependencies
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'org.jetbrains.kotlin.android'
|
id 'org.jetbrains.kotlin.plugin.compose'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -37,13 +37,8 @@ android {
|
|||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
postprocessing {
|
minifyEnabled true
|
||||||
removeUnusedCode false
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
removeUnusedResources true
|
|
||||||
obfuscate false
|
|
||||||
optimizeCode true
|
|
||||||
proguardFiles 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
debuggable false
|
debuggable false
|
||||||
jniDebuggable false
|
jniDebuggable false
|
||||||
@@ -53,18 +48,11 @@ android {
|
|||||||
sourceCompatibility JavaVersion.VERSION_21
|
sourceCompatibility JavaVersion.VERSION_21
|
||||||
targetCompatibility JavaVersion.VERSION_21
|
targetCompatibility JavaVersion.VERSION_21
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '21'
|
|
||||||
freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn", "-Xallow-jvm-ir-dependencies"]
|
|
||||||
}
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
compose true
|
compose true
|
||||||
prefab true
|
prefab true
|
||||||
buildConfig true
|
buildConfig true
|
||||||
}
|
}
|
||||||
composeOptions {
|
|
||||||
kotlinCompilerExtensionVersion '1.5.15'
|
|
||||||
}
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
jniLibs {
|
jniLibs {
|
||||||
keepDebugSymbols += '**/libkenjinx.so'
|
keepDebugSymbols += '**/libkenjinx.so'
|
||||||
@@ -77,7 +65,7 @@ android {
|
|||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
path file('src/main/cpp/CMakeLists.txt')
|
path file('src/main/cpp/CMakeLists.txt')
|
||||||
version '3.22.1'
|
version '4.2.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +82,7 @@ tasks.named("preBuild") {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
runtimeOnly project(":libkenjinx")
|
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.appcompat:appcompat:1.7.1'
|
||||||
implementation 'androidx.compose.material3:material3'
|
implementation 'androidx.compose.material3:material3'
|
||||||
implementation 'androidx.compose.material:material-icons-extended:1.7.8'
|
implementation 'androidx.compose.material:material-icons-extended:1.7.8'
|
||||||
@@ -103,28 +91,28 @@ dependencies {
|
|||||||
implementation 'androidx.compose.ui:ui-tooling-preview'
|
implementation 'androidx.compose.ui:ui-tooling-preview'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
||||||
implementation 'androidx.core:core-ktx:1.17.0'
|
implementation 'androidx.core:core-ktx:1.17.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.9.1'
|
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.10.0'
|
||||||
implementation 'androidx.navigation:navigation-compose:2.9.3'
|
implementation 'androidx.navigation:navigation-compose:2.9.6'
|
||||||
implementation 'androidx.preference:preference-ktx:1.2.1'
|
implementation 'androidx.preference:preference-ktx:1.2.1'
|
||||||
implementation 'br.com.devsrsouza.compose.icons:css-gg:1.1.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.github.swordfish90:radialgamepad:2.0.0'
|
||||||
implementation 'com.google.android.material:material:1.13.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-commonmark:0.20.0'
|
||||||
implementation 'com.halilibo.compose-richtext:richtext-ui-material3: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 'com.halilibo.compose-richtext:richtext-ui:0.20.0'
|
||||||
implementation 'io.coil-kt:coil-compose:2.7.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 'net.lingala.zip4j:zip4j:2.11.5'
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0'
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2'
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0'
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2'
|
||||||
implementation platform('androidx.compose:compose-bom:2024.08.00')
|
implementation platform('androidx.compose:compose-bom:2026.01.00')
|
||||||
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.9.25')
|
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.9.25')
|
||||||
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
|
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.3.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'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
debugImplementation 'androidx.compose.ui:ui-test-manifest'
|
debugImplementation 'androidx.compose.ui:ui-test-manifest'
|
||||||
debugImplementation 'androidx.compose.ui:ui-tooling'
|
debugImplementation 'androidx.compose.ui:ui-tooling'
|
||||||
|
|||||||
+1
@@ -13,6 +13,7 @@
|
|||||||
-repackageclasses ''
|
-repackageclasses ''
|
||||||
-keepattributes Exceptions,InnerClasses,Signature,*Annotation*
|
-keepattributes Exceptions,InnerClasses,Signature,*Annotation*
|
||||||
-dontpreverify
|
-dontpreverify
|
||||||
|
-keep class ** { *; }
|
||||||
-keep public class * extends android.app.Activity
|
-keep public class * extends android.app.Activity
|
||||||
-keep public class * extends android.app.Application
|
-keep public class * extends android.app.Application
|
||||||
-keep public class * extends android.app.Service
|
-keep public class * extends android.app.Service
|
||||||
|
|||||||
+16
-4
@@ -82,10 +82,22 @@ class HomeViewModel(
|
|||||||
|
|
||||||
thread {
|
thread {
|
||||||
try {
|
try {
|
||||||
for (file in folder.search(true, DocumentFileType.FILE)) {
|
val validExtensions = setOf("xci", "nsp", "nro")
|
||||||
if (file.extension == "xci" || file.extension == "nsp" || file.extension == "nro")
|
val queue = mutableListOf(folder)
|
||||||
activity.let {
|
|
||||||
loadedCache.add(GameModel(file, it))
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-9
@@ -4,9 +4,7 @@ import android.content.SharedPreferences
|
|||||||
import androidx.compose.runtime.MutableState
|
import androidx.compose.runtime.MutableState
|
||||||
import androidx.documentfile.provider.DocumentFile
|
import androidx.documentfile.provider.DocumentFile
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import com.anggrayudi.storage.callback.FileCallback
|
|
||||||
import com.anggrayudi.storage.file.FileFullPath
|
import com.anggrayudi.storage.file.FileFullPath
|
||||||
import com.anggrayudi.storage.file.copyFileTo
|
|
||||||
import com.anggrayudi.storage.file.extension
|
import com.anggrayudi.storage.file.extension
|
||||||
import com.anggrayudi.storage.file.getAbsolutePath
|
import com.anggrayudi.storage.file.getAbsolutePath
|
||||||
import com.anggrayudi.storage.file.openInputStream
|
import com.anggrayudi.storage.file.openInputStream
|
||||||
@@ -286,17 +284,19 @@ class SettingsViewModel(val activity: MainActivity) {
|
|||||||
installState.value = KeyInstallState.Install
|
installState.value = KeyInstallState.Install
|
||||||
thread {
|
thread {
|
||||||
Thread.sleep(1000)
|
Thread.sleep(1000)
|
||||||
this.copyFileTo(
|
try {
|
||||||
activity,
|
this.openInputStream(activity)?.use { input ->
|
||||||
outputFolder,
|
outputFile.outputStream().use { output ->
|
||||||
callback = object : FileCallback() {
|
input.copyTo(output)
|
||||||
override fun onCompleted(result: Any) {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
KenjinxNative.deviceReloadFilesystem()
|
KenjinxNative.deviceReloadFilesystem()
|
||||||
installState.value = KeyInstallState.Done
|
installState.value = KeyInstallState.Done
|
||||||
|
} catch (e: Exception) {
|
||||||
|
installState.value = KeyInstallState.Cancelled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application' version '8.13.2' apply false
|
id 'com.android.application' version '9.0.0' apply false
|
||||||
id 'com.android.library' version '8.13.2' apply false
|
id 'com.android.library' version '9.0.0' apply false
|
||||||
id 'org.jetbrains.kotlin.android' version '1.9.25' apply false
|
id 'org.jetbrains.kotlin.android' version '2.3.0' apply false
|
||||||
|
id 'org.jetbrains.kotlin.plugin.compose' version '2.3.0' apply false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#Fri Jun 30 08:45:05 UTC 2023
|
#Fri Jun 30 08:45:05 UTC 2023
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Reference in New Issue
Block a user