diff options
Diffstat (limited to 'platform/android/SCsub')
-rw-r--r-- | platform/android/SCsub | 14 |
1 files changed, 14 insertions, 0 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) |