diff options
-rw-r--r-- | SConstruct | 2 | ||||
-rw-r--r-- | methods.py | 4 | ||||
-rw-r--r-- | platform/android/SCsub | 12 |
3 files changed, 17 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index 6045be54c7..c05a4332ab 100644 --- a/SConstruct +++ b/SConstruct @@ -72,6 +72,7 @@ env_base.AppendENVPath('PATH', os.getenv('PATH')) env_base.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH')) env_base.global_defaults = global_defaults env_base.android_maven_repos = [] +env_base.android_flat_dirs = [] env_base.android_dependencies = [] env_base.android_gradle_plugins = [] env_base.android_gradle_classpath = [] @@ -96,6 +97,7 @@ env_base.SetOption('implicit_cache', 1) env_base.__class__.android_add_maven_repository = methods.android_add_maven_repository +env_base.__class__.android_add_flat_dir = methods.android_add_flat_dir env_base.__class__.android_add_dependency = methods.android_add_dependency env_base.__class__.android_add_java_dir = methods.android_add_java_dir env_base.__class__.android_add_res_dir = methods.android_add_res_dir diff --git a/methods.py b/methods.py index f1ef95f6fe..b56a0364b5 100644 --- a/methods.py +++ b/methods.py @@ -1360,6 +1360,10 @@ def win32_spawn(sh, escape, cmd, args, spawnenv): return exit_code """ +def android_add_flat_dir(self, dir): + if (dir not in self.android_flat_dirs): + self.android_flat_dirs.append(dir) + def android_add_maven_repository(self, url): if (url not in self.android_maven_repos): self.android_maven_repos.append(url) diff --git a/platform/android/SCsub b/platform/android/SCsub index e9a370869f..7fa0262359 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -46,8 +46,18 @@ gradle_baseout = open_utf8(abspath + "/java/build.gradle", "w") gradle_text = gradle_basein.read() - +gradle_maven_flat_text = "" +if len(env.android_flat_dirs) > 0: + gradle_maven_flat_text += "flatDir {\n" + gradle_maven_flat_text += "\tdirs " + for x in env.android_flat_dirs: + gradle_maven_flat_text += "'" + x + "'," + + gradle_maven_flat_text = gradle_maven_flat_text[:-1] + gradle_maven_flat_text += "\n\t}\n" + gradle_maven_repos_text = "" +gradle_maven_repos_text += gradle_maven_flat_text if len(env.android_maven_repos) > 0: gradle_maven_repos_text += "" |