diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-12-09 23:01:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-09 23:01:30 +0100 |
commit | 1a2cdcbcc80e0b8e9869e05288e53b6d5b986d00 (patch) | |
tree | 171cca2b2ecf415dfa9dfb7b1ed3969431153815 /platform/android/java/app/config.gradle | |
parent | f0b5cd51b6b2a7e913a084010e3bfca4921db033 (diff) | |
parent | 2e7e6502ddc5f50dad1c896246a673f228ea8786 (diff) |
Merge pull request #55737 from m4gr3d/add_min_target_sdk_configs_master
Diffstat (limited to 'platform/android/java/app/config.gradle')
-rw-r--r-- | platform/android/java/app/config.gradle | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle index 2a2850df0f..32e03998da 100644 --- a/platform/android/java/app/config.gradle +++ b/platform/android/java/app/config.gradle @@ -1,8 +1,8 @@ ext.versions = [ androidGradlePlugin: '7.0.3', compileSdk : 30, - minSdk : 19, // Also update 'platform/android/java/lib/AndroidManifest.xml#minSdkVersion' value - targetSdk : 30, // Also update 'platform/android/java/lib/AndroidManifest.xml#targetSdkVersion' value + minSdk : 19, // Also update 'platform/android/java/lib/AndroidManifest.xml#minSdkVersion' & 'platform/android/export/export_plugin.cpp#DEFAULT_MIN_SDK_VERSION' + targetSdk : 30, // Also update 'platform/android/java/lib/AndroidManifest.xml#targetSdkVersion' & 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION' buildTools : '30.0.3', kotlinVersion : '1.5.10', fragmentVersion : '1.3.6', @@ -48,6 +48,30 @@ ext.getExportVersionName = { -> return versionName } +ext.getExportMinSdkVersion = { -> + String minSdkVersion = project.hasProperty("export_version_min_sdk") ? project.property("export_version_min_sdk") : "" + if (minSdkVersion == null || minSdkVersion.isEmpty()) { + minSdkVersion = "$versions.minSdk" + } + try { + return Integer.parseInt(minSdkVersion) + } catch (NumberFormatException ignored) { + return versions.minSdk + } +} + +ext.getExportTargetSdkVersion = { -> + String targetSdkVersion = project.hasProperty("export_version_target_sdk") ? project.property("export_version_target_sdk") : "" + if (targetSdkVersion == null || targetSdkVersion.isEmpty()) { + targetSdkVersion = "$versions.targetSdk" + } + try { + return Integer.parseInt(targetSdkVersion) + } catch (NumberFormatException ignored) { + return versions.targetSdk + } +} + ext.getGodotEditorVersion = { -> String editorVersion = project.hasProperty("godot_editor_version") ? project.property("godot_editor_version") : "" if (editorVersion == null || editorVersion.isEmpty()) { |