Clean up the build commands used by the editor for gradle builds

This commit is contained in:
Fredia Huya-Kouadio 2024-04-30 14:09:24 -07:00 committed by Fredia Huya-Kouadio
parent 0342900b77
commit d38c5b6737
3 changed files with 33 additions and 64 deletions

View file

@ -3365,18 +3365,17 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
}
List<String> copy_args;
String copy_command;
if (export_format == EXPORT_FORMAT_AAB) {
copy_command = vformat("copyAndRename%sAab", build_type);
} else if (export_format == EXPORT_FORMAT_APK) {
copy_command = vformat("copyAndRename%sApk", build_type);
}
String copy_command = "copyAndRenameBinary";
copy_args.push_back(copy_command);
copy_args.push_back("-p"); // argument to specify the start directory.
copy_args.push_back(build_path); // start directory.
copy_args.push_back("-Pexport_build_type=" + build_type.to_lower());
String export_format_arg = export_format == EXPORT_FORMAT_AAB ? "aab" : "apk";
copy_args.push_back("-Pexport_format=" + export_format_arg);
String export_filename = p_path.get_file();
String export_path = p_path.get_base_dir();
if (export_path.is_relative_path()) {