diff options
| author | 2023-06-11 19:26:36 -0400 | |
|---|---|---|
| committer | 2023-06-11 20:04:08 -0400 | |
| commit | 5751822e310e469dbafc46b038789cf97a7ce4d9 (patch) | |
| tree | f6f3f94c99005539ba8dc58422df263298d5b84c /src/android | |
| parent | Merge pull request #10668 from Kelebek1/reduce_vertex_bindings (diff) | |
| download | yuzu-5751822e310e469dbafc46b038789cf97a7ce4d9.tar.gz yuzu-5751822e310e469dbafc46b038789cf97a7ce4d9.tar.xz yuzu-5751822e310e469dbafc46b038789cf97a7ce4d9.zip | |
android: Use autoVersion when gradle property is set
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/build.gradle.kts | 16 |
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 @@ | |||
| 2 | // SPDX-License-Identifier: GPL-3.0-or-later | 2 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 3 | 3 | ||
| 4 | import android.annotation.SuppressLint | 4 | import android.annotation.SuppressLint |
| 5 | import org.jetbrains.kotlin.konan.properties.Properties | ||
| 5 | 6 | ||
| 6 | plugins { | 7 | plugins { |
| 7 | id("com.android.application") | 8 | id("com.android.application") |
| @@ -57,9 +58,22 @@ android { | |||
| 57 | applicationId = "org.yuzu.yuzu_emu" | 58 | applicationId = "org.yuzu.yuzu_emu" |
| 58 | minSdk = 30 | 59 | minSdk = 30 |
| 59 | targetSdk = 33 | 60 | targetSdk = 33 |
| 60 | versionCode = 1 | ||
| 61 | versionName = getGitVersion() | 61 | versionName = getGitVersion() |
| 62 | 62 | ||
| 63 | // If you want to use autoVersion for the versionCode, create a property in local.properties | ||
| 64 | // named "autoVersioned" and set it to "true" | ||
| 65 | val properties = Properties() | ||
| 66 | val versionProperty = try { | ||
| 67 | properties.load(project.rootProject.file("local.properties").inputStream()) | ||
| 68 | properties.getProperty("autoVersioned") ?: "" | ||
| 69 | } catch (e: Exception) { "" } | ||
| 70 | |||
| 71 | versionCode = if (versionProperty == "true") { | ||
| 72 | autoVersion | ||
| 73 | } else { | ||
| 74 | 1 | ||
| 75 | } | ||
| 76 | |||
| 63 | ndk { | 77 | ndk { |
| 64 | @SuppressLint("ChromeOsAbiSupport") | 78 | @SuppressLint("ChromeOsAbiSupport") |
| 65 | abiFilters += listOf("arm64-v8a") | 79 | abiFilters += listOf("arm64-v8a") |