summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-06-12 22:12:32 +0200
committerGitHub <noreply@github.com>2023-06-12 22:12:32 +0200
commit5a2e0d5b76897263ae28a50544e9bae2f28a8e42 (patch)
treeec294522c79111748605e076ee981e9edf190ad2
parentMerge pull request #10699 from liamwhite/conditional-barrier (diff)
parentandroid: Use autoVersion when gradle property is set (diff)
downloadyuzu-5a2e0d5b76897263ae28a50544e9bae2f28a8e42.tar
yuzu-5a2e0d5b76897263ae28a50544e9bae2f28a8e42.tar.gz
yuzu-5a2e0d5b76897263ae28a50544e9bae2f28a8e42.tar.bz2
yuzu-5a2e0d5b76897263ae28a50544e9bae2f28a8e42.tar.lz
yuzu-5a2e0d5b76897263ae28a50544e9bae2f28a8e42.tar.xz
yuzu-5a2e0d5b76897263ae28a50544e9bae2f28a8e42.tar.zst
yuzu-5a2e0d5b76897263ae28a50544e9bae2f28a8e42.zip
-rw-r--r--src/android/app/build.gradle.kts16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts
index d4698ae1c..fe613d339 100644
--- a/src/android/app/build.gradle.kts
+++ b/src/android/app/build.gradle.kts
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
import android.annotation.SuppressLint
+import org.jetbrains.kotlin.konan.properties.Properties
plugins {
id("com.android.application")
@@ -57,9 +58,22 @@ android {
applicationId = "org.yuzu.yuzu_emu"
minSdk = 30
targetSdk = 33
- versionCode = 1
versionName = getGitVersion()
+ // If you want to use autoVersion for the versionCode, create a property in local.properties
+ // named "autoVersioned" and set it to "true"
+ val properties = Properties()
+ val versionProperty = try {
+ properties.load(project.rootProject.file("local.properties").inputStream())
+ properties.getProperty("autoVersioned") ?: ""
+ } catch (e: Exception) { "" }
+
+ versionCode = if (versionProperty == "true") {
+ autoVersion
+ } else {
+ 1
+ }
+
ndk {
@SuppressLint("ChromeOsAbiSupport")
abiFilters += listOf("arm64-v8a")