summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorfhuya <fhuya@google.com>2019-10-18 09:59:04 -0700
committerfhuya <fhuya@google.com>2020-03-05 10:00:19 -0800
commitf097defba135dcc8d195019c0ce0e4bf171b07a7 (patch)
tree27133f40aa4c4c204ec6a7a3fe9bec77ba145fbb /editor
parent60ea8aea98e76fd4514c65ca1ebd7f015283e991 (diff)
Re-architecture of the Godot Android plugin.
Diffstat (limited to 'editor')
-rw-r--r--editor/export_template_manager.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 12c756122e..9328a5e04d 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -561,13 +561,6 @@ Error ExportTemplateManager::install_android_template() {
// Make res://android dir (if it does not exist).
da->make_dir("android");
{
- // Add an empty .gdignore file to avoid scan.
- FileAccessRef f = FileAccess::open("res://android/.gdignore", FileAccess::WRITE);
- ERR_FAIL_COND_V(!f, ERR_CANT_CREATE);
- f->store_line("");
- f->close();
- }
- {
// Add version, to ensure building won't work if template and Godot version don't match.
FileAccessRef f = FileAccess::open("res://android/.build_version", FileAccess::WRITE);
ERR_FAIL_COND_V(!f, ERR_CANT_CREATE);
@@ -575,8 +568,19 @@ Error ExportTemplateManager::install_android_template() {
f->close();
}
- Error err = da->make_dir_recursive("android/build");
+ // Create the android plugins directory.
+ Error err = da->make_dir_recursive("android/plugins");
+ ERR_FAIL_COND_V(err != OK, err);
+
+ err = da->make_dir_recursive("android/build");
ERR_FAIL_COND_V(err != OK, err);
+ {
+ // Add an empty .gdignore file to avoid scan.
+ FileAccessRef f = FileAccess::open("res://android/build/.gdignore", FileAccess::WRITE);
+ ERR_FAIL_COND_V(!f, ERR_CANT_CREATE);
+ f->store_line("");
+ f->close();
+ }
// Uncompress source template.