diff options
Diffstat (limited to 'platform/android/SCsub')
-rw-r--r-- | platform/android/SCsub | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/platform/android/SCsub b/platform/android/SCsub index 02a8c3bc42..7fb3c876be 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -52,13 +52,13 @@ if len(env.android_maven_repos) > 0: gradle_maven_repos_text += "" for x in env.android_maven_repos: gradle_maven_repos_text += "\tmaven {\n" - gradle_maven_repos_text += "\t\t" + x + "\n" + gradle_maven_repos_text += "\t" + x + "\n" gradle_maven_repos_text += "\t}\n" gradle_maven_dependencies_text = "" for x in env.android_dependencies: - gradle_maven_dependencies_text += x + "\n" + gradle_maven_dependencies_text += x + "\n\t" gradle_java_dirs_text = "" @@ -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) |