mirror of
https://github.com/godotengine/godot.git
synced 2024-12-02 00:52:50 +00:00
flatDir support [Android]
This commit is contained in:
parent
0f9e1b5f0c
commit
77332861c2
@ -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 = []
|
||||
@ -89,6 +90,7 @@ env_base.split_drivers = False
|
||||
|
||||
|
||||
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
|
||||
|
@ -1279,6 +1279,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)
|
||||
|
@ -44,8 +44,18 @@ gradle_baseout = open(abspath + "/java/build.gradle", "wb")
|
||||
|
||||
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 += ""
|
||||
|
Loading…
Reference in New Issue
Block a user