diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-05 14:55:28 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-05 14:55:28 +0100 |
commit | 93bc77567af382302af576a57823011073e99ff9 (patch) | |
tree | e82d057bd11e26b123361bd678298f7ccc5dec12 /platform/android/export/export_plugin.cpp | |
parent | 6399fae16de511504c11501893b6e38b4ed804aa (diff) | |
parent | 90b43648c4536bddd4efa1ec684f971c9ec43632 (diff) | |
download | redot-engine-93bc77567af382302af576a57823011073e99ff9.tar.gz |
Merge pull request #89173 from m4gr3d/fix_template_warning_for_custom_source_template
Update the Android export validation logic to account for the custom gradle android source template
Diffstat (limited to 'platform/android/export/export_plugin.cpp')
-rw-r--r-- | platform/android/export/export_plugin.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index db0352db01..74d22bc44f 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -2408,9 +2408,22 @@ bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref<Edito err += template_err; } } else { + // Validate the custom gradle android source template. + bool android_source_template_valid = false; + const String android_source_template = p_preset->get("gradle_build/android_source_template"); + if (!android_source_template.is_empty()) { + android_source_template_valid = FileAccess::exists(android_source_template); + if (!android_source_template_valid) { + err += TTR("Custom Android source template not found.") + "\n"; + } + } + + // Validate the installed build template. bool installed_android_build_template = FileAccess::exists(ExportTemplateManager::get_android_build_directory(p_preset).path_join("build.gradle")); if (!installed_android_build_template) { - r_missing_templates = !exists_export_template("android_source.zip", &err); + if (!android_source_template_valid) { + r_missing_templates = !exists_export_template("android_source.zip", &err); + } err += TTR("Android build template not installed in the project. Install it from the Project menu.") + "\n"; } else { r_missing_templates = false; |