diff options
-rw-r--r-- | platform/android/SCsub | 14 | ||||
-rw-r--r-- | platform/android/build.gradle.template | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/platform/android/SCsub b/platform/android/SCsub index 02a8c3bc42..a6da33e7bf 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -92,9 +92,23 @@ gradle_asset_dirs_text = "" gradle_default_config_text = "" +minSdk = 14 +targetSdk = 23 + for x in env.android_default_config: + if x.startswith("minSdkVersion") and int(x.split(" ")[-1]) < minSdk: + x = "minSdkVersion " + str(minSdk) + if x.startswith("targetSdkVersion") and int(x.split()[-1]) > targetSdk: + x = "targetSdkVersion " + str(targetSdk) + gradle_default_config_text += x + "\n\t\t" +if "minSdkVersion" not in gradle_default_config_text: + gradle_default_config_text += ("minSdkVersion " + str(minSdk) + "\n\t\t") + +if "targetSdkVersion" not in gradle_default_config_text: + gradle_default_config_text += ("targetSdkVersion " + str(targetSdk) + "\n\t\t") + gradle_text = gradle_text.replace("$$GRADLE_REPOSITORY_URLS$$", gradle_maven_repos_text) gradle_text = gradle_text.replace("$$GRADLE_DEPENDENCIES$$", gradle_maven_dependencies_text) gradle_text = gradle_text.replace("$$GRADLE_JAVA_DIRS$$", gradle_java_dirs_text) diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template index ec5bbb6630..8dfb006c00 100644 --- a/platform/android/build.gradle.template +++ b/platform/android/build.gradle.template @@ -39,8 +39,6 @@ android { exclude 'META-INF/NOTICE' } defaultConfig { - minSdkVersion 14 - targetSdkVersion 23 $$GRADLE_DEFAULT_CONFIG$$ } // Both signing and zip-aligning will be done at export time |