summaryrefslogtreecommitdiff
path: root/Source/Android
diff options
context:
space:
mode:
authorSimonx22 <simon@oatmealdome.me>2026-03-16 14:46:50 -0400
committerSimonx22 <simon@oatmealdome.me>2026-03-21 10:50:34 -0400
commite878174235dceb77e659e245482e0d9bf99a9f75 (patch)
tree4256344ea58da811c01fa70abbca0380f93aadf8 /Source/Android
parent8ac767e0329191f93f25657eef4f7d87b59cae34 (diff)
Android: Use version catalog and update dependencies
Migrate plugin and dependency versions to a Gradle version catalog and update dependencies to their latest available versions.
Diffstat (limited to 'Source/Android')
-rw-r--r--Source/Android/app/build.gradle.kts64
-rw-r--r--Source/Android/benchmark/build.gradle.kts26
-rw-r--r--Source/Android/build.gradle.kts9
-rw-r--r--Source/Android/gradle.properties1
-rw-r--r--Source/Android/gradle/libs.versions.toml61
-rw-r--r--Source/Android/gradle/wrapper/gradle-wrapper.jarbin45633 -> 48966 bytes
-rw-r--r--Source/Android/gradle/wrapper/gradle-wrapper.properties2
-rwxr-xr-xSource/Android/gradlew2
8 files changed, 104 insertions, 61 deletions
diff --git a/Source/Android/app/build.gradle.kts b/Source/Android/app/build.gradle.kts
index 5eda1b1f5d..0a952a0704 100644
--- a/Source/Android/app/build.gradle.kts
+++ b/Source/Android/app/build.gradle.kts
@@ -1,20 +1,18 @@
-import org.jetbrains.kotlin.gradle.dsl.JvmTarget
-
plugins {
- id("com.android.application")
- id("org.jetbrains.kotlin.android")
- kotlin("plugin.serialization") version "2.2.21"
- id("androidx.baselineprofile")
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.kotlin.serialization)
+ alias(libs.plugins.androidx.baselineprofile)
}
@Suppress("UnstableApiUsage")
android {
- compileSdkVersion = "android-36"
+ compileSdk = 36
ndkVersion = "29.0.14206865"
buildFeatures {
viewBinding = true
buildConfig = true
+ resValues = true
}
compileOptions {
@@ -25,12 +23,6 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
- kotlin {
- compilerOptions {
- jvmTarget = JvmTarget.fromTarget("17")
- }
- }
-
lint {
// This is important as it will run lint but not abort on error
// Lint has some overly obnoxious "errors" that should really be warnings
@@ -79,7 +71,7 @@ android {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
- getDefaultProguardFile("proguard-android.txt"),
+ getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
@@ -126,38 +118,38 @@ android {
dependencies {
baselineProfile(project(":benchmark"))
- coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
-
- implementation("androidx.core:core-ktx:1.17.0")
- implementation("androidx.appcompat:appcompat:1.7.1")
- implementation("androidx.cardview:cardview:1.0.0")
- implementation("androidx.recyclerview:recyclerview:1.4.0")
- implementation("androidx.constraintlayout:constraintlayout:2.2.1")
- implementation("androidx.fragment:fragment-ktx:1.8.9")
- implementation("androidx.slidingpanelayout:slidingpanelayout:1.2.0")
- implementation("com.google.android.material:material:1.13.0")
- implementation("androidx.core:core-splashscreen:1.2.0")
- implementation("androidx.preference:preference-ktx:1.2.1")
- implementation("androidx.profileinstaller:profileinstaller:1.4.1")
+ coreLibraryDesugaring(libs.desugar.jdk.libs)
+
+ implementation(libs.androidx.core.ktx)
+ implementation(libs.androidx.appcompat)
+ implementation(libs.androidx.cardview)
+ implementation(libs.androidx.recyclerview)
+ implementation(libs.androidx.constraintlayout)
+ implementation(libs.androidx.fragment.ktx)
+ implementation(libs.androidx.slidingpanelayout)
+ implementation(libs.material)
+ implementation(libs.androidx.core.splashscreen)
+ implementation(libs.androidx.preference.ktx)
+ implementation(libs.androidx.profileinstaller)
// Kotlin extensions for lifecycle components
- implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.4")
- implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.4")
+ implementation(libs.androidx.lifecycle.viewmodel.ktx)
+ implementation(libs.androidx.lifecycle.runtime.ktx)
// Android TV UI libraries.
- implementation("androidx.leanback:leanback:1.2.0")
- implementation("androidx.tvprovider:tvprovider:1.1.0")
- implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
+ implementation(libs.androidx.leanback)
+ implementation(libs.androidx.tvprovider)
+ implementation(libs.androidx.swiperefreshlayout)
// For loading game covers from disk and GameTDB
- implementation("io.coil-kt:coil:2.7.0")
+ implementation(libs.coil)
// For loading custom GPU drivers
- implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0")
+ implementation(libs.kotlinx.serialization.json)
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
+ implementation(libs.kotlinx.coroutines.android)
- implementation("com.nononsenseapps:filepicker:4.2.1")
+ implementation(libs.filepicker)
}
fun getGitVersion(): String {
diff --git a/Source/Android/benchmark/build.gradle.kts b/Source/Android/benchmark/build.gradle.kts
index 242aff8f86..21efb6a0d6 100644
--- a/Source/Android/benchmark/build.gradle.kts
+++ b/Source/Android/benchmark/build.gradle.kts
@@ -1,37 +1,29 @@
import com.android.build.api.dsl.ManagedVirtualDevice
-import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
- id("com.android.test")
- id("org.jetbrains.kotlin.android")
- id("androidx.baselineprofile")
+ alias(libs.plugins.android.test)
+ alias(libs.plugins.androidx.baselineprofile)
}
android {
namespace = "org.dolphinemu.baselineprofile"
- compileSdk = 34
+ compileSdk = 36
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
- kotlin {
- compilerOptions {
- jvmTarget = JvmTarget.fromTarget("17")
- }
- }
-
defaultConfig {
minSdk = 28
- targetSdk = 34
+ targetSdk = 36
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
targetProjectPath = ":app"
- testOptions.managedDevices.devices {
+ testOptions.managedDevices.allDevices {
create<ManagedVirtualDevice>("pixel6Api31") {
device = "Pixel 6"
apiLevel = 31
@@ -48,8 +40,8 @@ baselineProfile {
}
dependencies {
- implementation("androidx.test.ext:junit:1.3.0")
- implementation("androidx.test.espresso:espresso-core:3.7.0")
- implementation("androidx.test.uiautomator:uiautomator:2.3.0")
- implementation("androidx.benchmark:benchmark-macro-junit4:1.4.1")
+ implementation(libs.androidx.junit)
+ implementation(libs.androidx.espresso.core)
+ implementation(libs.androidx.uiautomator)
+ implementation(libs.androidx.benchmark.macro.junit4)
}
diff --git a/Source/Android/build.gradle.kts b/Source/Android/build.gradle.kts
index 2c39f29bd2..5682b2f130 100644
--- a/Source/Android/build.gradle.kts
+++ b/Source/Android/build.gradle.kts
@@ -1,10 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id("com.android.application") version "8.13.1" apply false
- id("com.android.library") version "8.13.1" apply false
- id("org.jetbrains.kotlin.android") version "2.2.21" apply false
- id("com.android.test") version "8.13.1" apply false
- id("androidx.baselineprofile") version "1.3.3" apply false
+ alias(libs.plugins.android.application) apply false
+ alias(libs.plugins.android.library) apply false
+ alias(libs.plugins.android.test) apply false
+ alias(libs.plugins.androidx.baselineprofile) apply false
}
buildscript {
diff --git a/Source/Android/gradle.properties b/Source/Android/gradle.properties
index 0f8bfbb671..42e35cc911 100644
--- a/Source/Android/gradle.properties
+++ b/Source/Android/gradle.properties
@@ -15,4 +15,3 @@ android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.nonTransitiveRClass=false
-android.nonFinalResIds=false
diff --git a/Source/Android/gradle/libs.versions.toml b/Source/Android/gradle/libs.versions.toml
new file mode 100644
index 0000000000..09fa7b09ca
--- /dev/null
+++ b/Source/Android/gradle/libs.versions.toml
@@ -0,0 +1,61 @@
+[versions]
+agp = "9.1.0"
+appcompat = "1.7.1"
+benchmarkMacroJunit4 = "1.5.0-alpha04"
+cardview = "1.0.0"
+coil = "2.7.0"
+constraintlayout = "2.2.1"
+coreKtx = "1.18.0"
+coreSplashscreen = "1.2.0"
+desugar_jdk_libs = "2.1.5"
+espressoCore = "3.7.0"
+filepicker = "4.2.1"
+fragmentKtx = "1.8.9"
+junit = "1.3.0"
+kotlin = "2.3.20"
+kotlinxCoroutinesAndroid = "1.10.2"
+kotlinxSerializationJson = "1.10.0"
+leanback = "1.2.0"
+lifecycle = "2.10.0"
+material = "1.13.0"
+preferenceKtx = "1.2.1"
+profileinstaller = "1.4.1"
+recyclerview = "1.4.0"
+slidingpanelayout = "1.2.0"
+swiperefreshlayout = "1.2.0"
+tvprovider = "1.1.0"
+uiautomator = "2.3.0"
+
+[libraries]
+androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+androidx-benchmark-macro-junit4 = { group = "androidx.benchmark", name = "benchmark-macro-junit4", version.ref = "benchmarkMacroJunit4" }
+androidx-cardview = { group = "androidx.cardview", name = "cardview", version.ref = "cardview" }
+androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
+androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
+androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "coreSplashscreen" }
+androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "fragmentKtx" }
+androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junit" }
+androidx-leanback = { group = "androidx.leanback", name = "leanback", version.ref = "leanback" }
+androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" }
+androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
+androidx-preference-ktx = { group = "androidx.preference", name = "preference-ktx", version.ref = "preferenceKtx" }
+androidx-profileinstaller = { group = "androidx.profileinstaller", name = "profileinstaller", version.ref = "profileinstaller" }
+androidx-recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerview" }
+androidx-slidingpanelayout = { group = "androidx.slidingpanelayout", name = "slidingpanelayout", version.ref = "slidingpanelayout" }
+androidx-swiperefreshlayout = { group = "androidx.swiperefreshlayout", name = "swiperefreshlayout", version.ref = "swiperefreshlayout" }
+androidx-tvprovider = { group = "androidx.tvprovider", name = "tvprovider", version.ref = "tvprovider" }
+androidx-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "uiautomator" }
+coil = { group = "io.coil-kt", name = "coil", version.ref = "coil" }
+desugar_jdk_libs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "desugar_jdk_libs" }
+filepicker = { group = "com.nononsenseapps", name = "filepicker", version.ref = "filepicker" }
+kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesAndroid" }
+kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+android-library = { id = "com.android.library", version.ref = "agp" }
+android-test = { id = "com.android.test", version.ref = "agp" }
+androidx-baselineprofile = { id = "androidx.baselineprofile", version.ref = "benchmarkMacroJunit4" }
+kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
diff --git a/Source/Android/gradle/wrapper/gradle-wrapper.jar b/Source/Android/gradle/wrapper/gradle-wrapper.jar
index f8e1ee3125..d997cfc60f 100644
--- a/Source/Android/gradle/wrapper/gradle-wrapper.jar
+++ b/Source/Android/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/Source/Android/gradle/wrapper/gradle-wrapper.properties b/Source/Android/gradle/wrapper/gradle-wrapper.properties
index bad7c2462f..c61a118f7d 100644
--- a/Source/Android/gradle/wrapper/gradle-wrapper.properties
+++ b/Source/Android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/Source/Android/gradlew b/Source/Android/gradlew
index adff685a03..0262dcbd52 100755
--- a/Source/Android/gradlew
+++ b/Source/Android/gradlew
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.