Skip to content

Commit

Permalink
Fix the generate_apk logic when dev_build or debug_symbols are …
Browse files Browse the repository at this point in the history
…enabled

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
  • Loading branch information
m4gr3d and akien-mga committed Jul 29, 2024
1 parent 88d9325 commit 98e2335
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions platform/android/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,18 @@ if lib_arch_dir != "":
else:
gradle_process = ["./gradlew"]

if env["target"] != "editor" and env["dev_build"]:
subprocess.run(
gradle_process
+ [
"generateDevTemplate",
"--quiet",
],
cwd="platform/android/java",
)
else:
# Android editor with `dev_build=yes` is handled by the `generateGodotEditor` task.
subprocess.run(
gradle_process
+ [
"generateGodotEditor" if env["target"] == "editor" else "generateGodotTemplates",
"--quiet",
],
cwd="platform/android/java",
)
gradle_process += [
"generateGodotEditor" if env["target"] == "editor" else "generateGodotTemplates",
"--quiet",
]

if env["dev_build"] or env["debug_symbols"]:
gradle_process += ["-PdoNotStrip=true"]

subprocess.run(
gradle_process,
cwd="platform/android/java",
)

if env["generate_apk"]:
generate_apk_command = env_android.Command("generate_apk", [], generate_apk)
Expand Down

0 comments on commit 98e2335

Please sign in to comment.