You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
SCons: Begin decoupling generation & build code
This commit is contained in:
31
platform/android/platform_android_builders.py
Normal file
31
platform/android/platform_android_builders.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""Functions used to generate source files during build time"""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def generate_android_binaries(target, source, env):
|
||||
gradle_process = []
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
gradle_process = [
|
||||
"cmd",
|
||||
"/c",
|
||||
"gradlew.bat",
|
||||
]
|
||||
else:
|
||||
gradle_process = ["./gradlew"]
|
||||
|
||||
if env["target"] == "editor":
|
||||
gradle_process += ["generateGodotEditor", "generateGodotHorizonOSEditor", "generateGodotPicoOSEditor"]
|
||||
else:
|
||||
gradle_process += ["generateGodotTemplates"]
|
||||
gradle_process += ["--quiet"]
|
||||
|
||||
if env["gradle_do_not_strip"]:
|
||||
gradle_process += ["-PdoNotStrip=true"]
|
||||
|
||||
subprocess.run(
|
||||
gradle_process,
|
||||
cwd="platform/android/java",
|
||||
)
|
||||
Reference in New Issue
Block a user