mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-03-06 18:08:48 +01:00
Android: Downgrade build dependencies and SDK versions
- Revert Android Gradle plugin from 8.8.1 to 8.1.2 - Downgrade Kotlin version from 2.1.20-RC to 1.9.20 - Lower Java/JVM target from 21 to 17 - Reduce CMake version from 3.31.5 to 3.22.1 - Update various Android dependencies to stable versions: - Navigation Safe Args plugin to 2.6.0 - ktlint to 0.47.1 - Play Publisher plugin to 3.8.6 - Remove custom APK naming scheme - Fix CMake boolean arguments (OFF -> 0) - Remove citron copyright header
This commit is contained in:
parent
b1d5d4e5be
commit
dc9fbcc893
2 changed files with 27 additions and 36 deletions
|
@ -11,10 +11,10 @@ plugins {
|
|||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("kotlin-parcelize")
|
||||
kotlin("plugin.serialization") version "2.1.20-RC"
|
||||
kotlin("plugin.serialization") version "1.9.20"
|
||||
id("androidx.navigation.safeargs.kotlin")
|
||||
id("org.jlleitschuh.gradle.ktlint") version "12.1.2"
|
||||
id("com.github.triplet.play") version "3.12.1"
|
||||
id("org.jlleitschuh.gradle.ktlint") version "11.4.0"
|
||||
id("com.github.triplet.play") version "3.8.6"
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,19 +29,19 @@ android {
|
|||
namespace = "org.citron.citron_emu"
|
||||
|
||||
compileSdkVersion = "android-35"
|
||||
ndkVersion = "28.0.13004108" // "27.2.12479018" // "26.1.10909125"
|
||||
ndkVersion = "26.1.10909125"
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "21"
|
||||
jvmTarget = "17"
|
||||
}
|
||||
|
||||
packaging {
|
||||
|
@ -76,15 +76,6 @@ android {
|
|||
buildConfigField("String", "BRANCH", "\"${getBranch()}\"")
|
||||
}
|
||||
|
||||
android.applicationVariants.all {
|
||||
val variant = this
|
||||
variant.outputs.all {
|
||||
if (this is com.android.build.gradle.internal.api.ApkVariantOutputImpl) {
|
||||
outputFileName = "Citron-${variant.versionName}-${variant.name}.apk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val keystoreFile = System.getenv("ANDROID_KEYSTORE_FILE")
|
||||
signingConfigs {
|
||||
if (keystoreFile != null) {
|
||||
|
@ -170,7 +161,7 @@ android {
|
|||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
version = "3.31.5"
|
||||
version = "3.22.1"
|
||||
path = file("../../../CMakeLists.txt")
|
||||
}
|
||||
}
|
||||
|
@ -179,9 +170,9 @@ android {
|
|||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments(
|
||||
"-DENABLE_QT=OFF", // Don't use QT
|
||||
"-DENABLE_SDL2=OFF", // Don't use SDL
|
||||
"-DENABLE_WEB_SERVICE=OFF", // Don't use telemetry
|
||||
"-DENABLE_QT=0", // Don't use QT
|
||||
"-DENABLE_SDL2=0", // Don't use SDL
|
||||
"-DENABLE_WEB_SERVICE=0", // Don't use telemetry
|
||||
"-DBUNDLE_SPEEX=ON",
|
||||
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
||||
"-DCITRON_USE_BUNDLED_VCPKG=ON",
|
||||
|
@ -212,7 +203,7 @@ tasks.getByPath("ktlintMainSourceSetCheck").doFirst { showFormatHelp.invoke() }
|
|||
tasks.getByPath("loadKtlintReporters").dependsOn("ktlintReset")
|
||||
|
||||
ktlint {
|
||||
version.set("0.51.1")
|
||||
version.set("0.47.1")
|
||||
android.set(true)
|
||||
ignoreFailures.set(false)
|
||||
disabledRules.set(
|
||||
|
@ -237,21 +228,22 @@ play {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation("androidx.core:core-ktx:1.15.0")
|
||||
implementation("androidx.appcompat:appcompat:1.7.0")
|
||||
implementation("androidx.recyclerview:recyclerview:1.4.0")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.2.0")
|
||||
implementation("androidx.fragment:fragment-ktx:1.8.6")
|
||||
implementation("androidx.core:core-ktx:1.12.0")
|
||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||
implementation("androidx.recyclerview:recyclerview:1.3.1")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||
implementation("androidx.fragment:fragment-ktx:1.6.1")
|
||||
implementation("androidx.documentfile:documentfile:1.0.1")
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
implementation("com.google.android.material:material:1.9.0")
|
||||
implementation("androidx.preference:preference-ktx:1.2.1")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")
|
||||
implementation("io.coil-kt:coil:2.2.2")
|
||||
implementation("androidx.core:core-splashscreen:1.0.1")
|
||||
implementation("androidx.window:window:1.3.0")
|
||||
implementation("androidx.window:window:1.2.0-beta03")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||
implementation("androidx.navigation:navigation-fragment-ktx:2.8.7")
|
||||
implementation("androidx.navigation:navigation-ui-ktx:2.8.7")
|
||||
implementation("androidx.navigation:navigation-fragment-ktx:2.7.4")
|
||||
implementation("androidx.navigation:navigation-ui-ktx:2.7.4")
|
||||
implementation("info.debatty:java-string-similarity:2.0.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2025 citron Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id("com.android.application") version "8.8.1" apply false
|
||||
id("com.android.library") version "8.8.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.1.20-RC" apply false
|
||||
id("com.android.application") version "8.1.2" apply false
|
||||
id("com.android.library") version "8.1.2" apply false
|
||||
id("org.jetbrains.kotlin.android") version "1.9.20" apply false
|
||||
}
|
||||
|
||||
tasks.register("clean").configure {
|
||||
|
@ -18,6 +17,6 @@ buildscript {
|
|||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.8.7")
|
||||
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue