diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-11-12 12:15:54 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-11-12 12:15:54 +0100 |
commit | 87ba798cba5122304154a2a2e6f8dff90ac740d6 (patch) | |
tree | 20714b60e09a7c2d244b358086c7be4a5c9cd538 /platform | |
parent | ef2cc1cc2bf4ffbeb999d375ee02cb8ee61d74dc (diff) | |
parent | 136b7f9c528f5036befba8b39e4bb41bd9d9890f (diff) | |
download | redot-engine-87ba798cba5122304154a2a2e6f8dff90ac740d6.tar.gz |
Merge pull request #84779 from m4gr3d/keep_android_build_window_open_on_failure
Preserve the output from the gradle build command
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/export/export_plugin.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 842381567c..f0ee405b41 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -3041,10 +3041,13 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP } } - int result = EditorNode::get_singleton()->execute_and_show_output(TTR("Building Android Project (gradle)"), build_command, cmdline); + String build_project_output; + int result = EditorNode::get_singleton()->execute_and_show_output(TTR("Building Android Project (gradle)"), build_command, cmdline, true, false, &build_project_output); if (result != 0) { - add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), TTR("Building of Android project failed, check output for the error. Alternatively visit docs.godotengine.org for Android build documentation.")); + add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), TTR("Building of Android project failed, check output for the error:") + "\n\n" + build_project_output); return ERR_CANT_CREATE; + } else { + print_verbose(build_project_output); } List<String> copy_args; @@ -3071,10 +3074,13 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP copy_args.push_back("-Pexport_filename=" + export_filename); print_verbose("Copying Android binary using gradle command: " + String("\n") + build_command + " " + join_list(copy_args, String(" "))); - int copy_result = EditorNode::get_singleton()->execute_and_show_output(TTR("Moving output"), build_command, copy_args); + String copy_binary_output; + int copy_result = EditorNode::get_singleton()->execute_and_show_output(TTR("Moving output"), build_command, copy_args, true, false, ©_binary_output); if (copy_result != 0) { - add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), TTR("Unable to copy and rename export file, check gradle project directory for outputs.")); + add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), TTR("Unable to copy and rename export file:") + "\n\n" + copy_binary_output); return ERR_CANT_CREATE; + } else { + print_verbose(copy_binary_output); } print_verbose("Successfully completed Android gradle build."); |