aboutsummaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorcrueter <swurl@swurl.xyz>2025-06-15 21:46:24 -0400
committercrueter <swurl@swurl.xyz>2025-06-15 21:46:24 -0400
commit5591ce30c9fd6cb55ff575bc8b1dc086a8d9ec7f (patch)
treec5656214d1baef0290bc3145630d5b6ad2bbb135 /src/android
parentaf923c92eb08b879405a4849eeada7dea1b7cb6a (diff)
Revert "[gradle] fix warnings & update deps (#189)"
This reverts commit af923c92eb08b879405a4849eeada7dea1b7cb6a.
Diffstat (limited to 'src/android')
-rw-r--r--src/android/app/build.gradle.kts47
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard.kt5
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt9
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GamePropertiesFragment.kt6
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt3
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/NfcReader.kt7
-rw-r--r--src/android/build.gradle.kts10
-rw-r--r--src/android/gradle.properties5
8 files changed, 46 insertions, 46 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts
index c99e62d4b8..de5d891f01 100644
--- a/src/android/app/build.gradle.kts
+++ b/src/android/app/build.gradle.kts
@@ -1,9 +1,9 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
-// SPDX-License-Identifier: GPL-3.0-or-later
-
// SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
import android.annotation.SuppressLint
import kotlin.collections.setOf
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
@@ -13,7 +13,7 @@ plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("kotlin-parcelize")
- kotlin("plugin.serialization") version "2.0.0-RC1"
+ kotlin("plugin.serialization") version "1.9.20"
id("androidx.navigation.safeargs.kotlin")
id("org.jlleitschuh.gradle.ktlint") version "11.4.0"
id("com.github.triplet.play") version "3.8.6"
@@ -35,7 +35,6 @@ android {
buildFeatures {
viewBinding = true
- buildConfig = true
}
compileOptions {
@@ -63,7 +62,11 @@ android {
targetSdk = 35
versionName = getGitVersion()
- versionCode = autoVersion
+ versionCode = if (System.getenv("AUTO_VERSIONED") == "true") {
+ autoVersion
+ } else {
+ 1
+ }
ndk {
@SuppressLint("ChromeOsAbiSupport")
@@ -118,6 +121,7 @@ android {
isDefault = true
resValue("string", "app_name_suffixed", "eden Debug Release")
signingConfig = signingConfigs.getByName("default")
+ isMinifyEnabled = true
isDebuggable = true
proguardFiles(
getDefaultProguardFile("proguard-android.txt"),
@@ -193,6 +197,13 @@ ktlint {
version.set("0.47.1")
android.set(true)
ignoreFailures.set(false)
+ disabledRules.set(
+ setOf(
+ "no-wildcard-imports",
+ "package-name",
+ "import-ordering"
+ )
+ )
reporters {
reporter(ReporterType.CHECKSTYLE)
}
@@ -208,29 +219,29 @@ play {
}
dependencies {
- implementation("androidx.core:core-ktx:1.16.0")
- implementation("androidx.appcompat:appcompat:1.7.1")
+ 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.1")
- implementation("androidx.fragment:fragment-ktx:1.8.8")
- implementation("androidx.documentfile:documentfile:1.1.0")
+ implementation("androidx.fragment:fragment-ktx:1.8.6")
+ implementation("androidx.documentfile:documentfile:1.0.1")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.preference:preference-ktx:1.2.1")
- implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.1")
+ implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
- implementation("io.coil-kt:coil:2.7.0")
+ implementation("io.coil-kt:coil:2.2.2")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.17.2")
- implementation("androidx.window:window:1.4.0")
+ implementation("androidx.window:window:1.3.0")
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
implementation("org.commonmark:commonmark:0.22.0")
- implementation("androidx.navigation:navigation-fragment-ktx:2.9.0")
- implementation("androidx.navigation:navigation-ui-ktx:2.9.0")
+ implementation("androidx.navigation:navigation-fragment-ktx:2.8.9")
+ implementation("androidx.navigation:navigation-ui-ktx:2.8.9")
implementation("info.debatty:java-string-similarity:2.0.0")
- implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
- implementation("androidx.compose.ui:ui-graphics-android:1.8.2")
- implementation("androidx.compose.ui:ui-text-android:1.8.2")
+ implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
+ implementation("androidx.compose.ui:ui-graphics-android:1.7.8")
+ implementation("androidx.compose.ui:ui-text-android:1.7.8")
}
fun runGitCommand(command: List<String>): String {
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard.kt
index ce4a83bcac..e058067c97 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/applets/keyboard/SoftwareKeyboard.kt
@@ -1,6 +1,3 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
-// SPDX-License-Identifier: GPL-3.0-or-later
-
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -38,7 +35,7 @@ object SoftwareKeyboard {
val overlayView = emulationActivity!!.findViewById<View>(R.id.surface_input_overlay)
val im =
overlayView.context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
- im.showSoftInput(overlayView, InputMethodManager.SHOW_IMPLICIT)
+ im.showSoftInput(overlayView, InputMethodManager.SHOW_FORCED)
// There isn't a good way to know that the IMM is dismissed, so poll every 500ms to submit inline keyboard result.
val handler = Handler(Looper.myLooper()!!)
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
index 9e6e175395..4b7da6ef23 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
@@ -1,9 +1,10 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
-// SPDX-License-Identifier: GPL-3.0-or-later
-
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-FileCopyrightText: 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+
package org.yuzu.yuzu_emu.fragments
import android.annotation.SuppressLint
@@ -1112,7 +1113,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
val cutInsets: Insets = windowInsets.getInsets(WindowInsetsCompat.Type.displayCutout())
var left = 0
var right = 0
- if (v.layoutDirection == View.LAYOUT_DIRECTION_LTR) {
+ if (ViewCompat.getLayoutDirection(v) == ViewCompat.LAYOUT_DIRECTION_LTR) {
left = cutInsets.left
} else {
right = cutInsets.right
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GamePropertiesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GamePropertiesFragment.kt
index a1242d547a..f55edb418e 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GamePropertiesFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GamePropertiesFragment.kt
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
package org.yuzu.yuzu_emu.fragments
@@ -300,8 +300,8 @@ class GamePropertiesFragment : Fragment() {
if (smallLayout) {
binding.listAll.updateMargins(left = leftInsets, right = rightInsets)
} else {
- if (binding.root.layoutDirection ==
- View.LAYOUT_DIRECTION_LTR
+ if (ViewCompat.getLayoutDirection(binding.root) ==
+ ViewCompat.LAYOUT_DIRECTION_LTR
) {
binding.listAll.updateMargins(right = rightInsets)
binding.iconLayout!!.updateMargins(top = barInsets.top, left = leftInsets)
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt
index e089784927..3e3759d7eb 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
package org.yuzu.yuzu_emu.ui.main
@@ -90,7 +90,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
WindowCompat.setDecorFitsSystemWindows(window, false)
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING)
- // TODO(crueter): Remove this
window.statusBarColor =
ContextCompat.getColor(applicationContext, android.R.color.transparent)
window.navigationBarColor =
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/NfcReader.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/NfcReader.kt
index bdc573405f..331b7ddca7 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/NfcReader.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/NfcReader.kt
@@ -1,6 +1,3 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
-// SPDX-License-Identifier: GPL-3.0-or-later
-
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -107,9 +104,7 @@ class NfcReader(private val activity: Activity) {
try {
val data = ntag215FastRead(amiibo, dataStart, dataEnd - 1)
- if (data != null) {
- System.arraycopy(data, 0, tagData, i, (dataEnd - dataStart) * pageSize)
- }
+ System.arraycopy(data, 0, tagData, i, (dataEnd - dataStart) * pageSize)
} catch (e: IOException) {
return null
}
diff --git a/src/android/build.gradle.kts b/src/android/build.gradle.kts
index c91585627b..051695d2d1 100644
--- a/src/android/build.gradle.kts
+++ b/src/android/build.gradle.kts
@@ -1,21 +1,19 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
-// SPDX-License-Identifier: GPL-3.0-or-later
-
// SPDX-FileCopyrightText: 2023 yuzu 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.10.1" apply false
+ id("com.android.application") version "8.9.1" apply false
id("com.android.library") version "8.1.4" apply false
- id("org.jetbrains.kotlin.android") version "2.0.0-RC1" apply false
+ id("org.jetbrains.kotlin.android") version "1.9.20" apply false
}
tasks.register("clean").configure {
- delete(rootProject.layout.buildDirectory)
+ delete(rootProject.buildDir)
}
buildscript {
+ val agp_version by extra("8.9.1")
repositories {
google()
}
diff --git a/src/android/gradle.properties b/src/android/gradle.properties
index e0574816d7..4fca1b5769 100644
--- a/src/android/gradle.properties
+++ b/src/android/gradle.properties
@@ -1,6 +1,3 @@
-# SPDX-FileCopyrightText: 2025 Eden Emulator Project
-# SPDX-License-Identifier: GPL-3.0-or-later
-
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -17,5 +14,7 @@ android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.parallel.tasks.in.project=true
+android.defaults.buildfeatures.buildconfig=true
+
# Android Gradle plugin 8.0.2
android.suppressUnsupportedCompileSdk=34