summaryrefslogtreecommitdiff
path: root/hello_signals/demo/addons
diff options
context:
space:
mode:
authorFredia Huya-Kouadio <fhuya@meta.com>2023-07-02 16:59:41 -0700
committerGitHub <noreply@github.com>2023-07-02 16:59:41 -0700
commit01f6b286390e552cd326df00ad16c65e5f5c703b (patch)
tree9ca58d95496b72bb7974d4525f4821284e3ade7f /hello_signals/demo/addons
parent8a50b716f5d335d0c060eb096032fc2d214dc635 (diff)
parent1d35faab621629b7cf27db2675c439d390a32541 (diff)
downloadgodot-android-samples-01f6b286390e552cd326df00ad16c65e5f5c703b.tar.gz
godot-android-samples-01f6b286390e552cd326df00ad16c65e5f5c703b.tar.bz2
godot-android-samples-01f6b286390e552cd326df00ad16c65e5f5c703b.zip
Merge pull request #1 from m4gr3d/godot_4_2_plugin_refactor
Godot 4.2 plugin refactor
Diffstat (limited to 'hello_signals/demo/addons')
-rw-r--r--hello_signals/demo/addons/hello_signals_plugin/.gdignore1
-rw-r--r--hello_signals/demo/addons/hello_signals_plugin/HelloSignals.debug.aarbin0 -> 6825 bytes
-rw-r--r--hello_signals/demo/addons/hello_signals_plugin/HelloSignals.release.aarbin0 -> 6647 bytes
-rw-r--r--hello_signals/demo/addons/hello_signals_plugin/hello_signals_export_plugin.gd16
-rw-r--r--hello_signals/demo/addons/hello_signals_plugin/hello_signals_plugin.gd17
-rw-r--r--hello_signals/demo/addons/hello_signals_plugin/plugin.cfg7
6 files changed, 41 insertions, 0 deletions
diff --git a/hello_signals/demo/addons/hello_signals_plugin/.gdignore b/hello_signals/demo/addons/hello_signals_plugin/.gdignore
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/hello_signals/demo/addons/hello_signals_plugin/.gdignore
@@ -0,0 +1 @@
+
diff --git a/hello_signals/demo/addons/hello_signals_plugin/HelloSignals.debug.aar b/hello_signals/demo/addons/hello_signals_plugin/HelloSignals.debug.aar
new file mode 100644
index 0000000..3e445c6
--- /dev/null
+++ b/hello_signals/demo/addons/hello_signals_plugin/HelloSignals.debug.aar
Binary files differ
diff --git a/hello_signals/demo/addons/hello_signals_plugin/HelloSignals.release.aar b/hello_signals/demo/addons/hello_signals_plugin/HelloSignals.release.aar
new file mode 100644
index 0000000..6440048
--- /dev/null
+++ b/hello_signals/demo/addons/hello_signals_plugin/HelloSignals.release.aar
Binary files differ
diff --git a/hello_signals/demo/addons/hello_signals_plugin/hello_signals_export_plugin.gd b/hello_signals/demo/addons/hello_signals_plugin/hello_signals_export_plugin.gd
new file mode 100644
index 0000000..afc4162
--- /dev/null
+++ b/hello_signals/demo/addons/hello_signals_plugin/hello_signals_export_plugin.gd
@@ -0,0 +1,16 @@
+@tool
+extends EditorExportPlugin
+
+func _supports_platform(platform):
+ if platform is EditorExportPlatformAndroid:
+ return true
+ return false
+
+func _get_android_libraries(platform, debug):
+ if debug:
+ return PackedStringArray(["hello_signals_plugin/HelloSignals.debug.aar"])
+ else:
+ return PackedStringArray(["hello_signals_plugin/HelloSignals.release.aar"])
+
+func _get_name():
+ return "Hello Signals plugin"
diff --git a/hello_signals/demo/addons/hello_signals_plugin/hello_signals_plugin.gd b/hello_signals/demo/addons/hello_signals_plugin/hello_signals_plugin.gd
new file mode 100644
index 0000000..65d8034
--- /dev/null
+++ b/hello_signals/demo/addons/hello_signals_plugin/hello_signals_plugin.gd
@@ -0,0 +1,17 @@
+@tool
+extends EditorPlugin
+
+# A class member to hold the export plugin during its lifecycle
+var export_plugin : EditorExportPlugin
+
+func _enter_tree():
+ # Initialization of the plugin goes here.
+ export_plugin = preload("hello_signals_export_plugin.gd").new()
+ add_export_plugin(export_plugin)
+ pass
+
+
+func _exit_tree():
+ # Clean-up of the plugin goes here.
+ remove_export_plugin(export_plugin)
+ export_plugin = null
diff --git a/hello_signals/demo/addons/hello_signals_plugin/plugin.cfg b/hello_signals/demo/addons/hello_signals_plugin/plugin.cfg
new file mode 100644
index 0000000..8fb2c37
--- /dev/null
+++ b/hello_signals/demo/addons/hello_signals_plugin/plugin.cfg
@@ -0,0 +1,7 @@
+[plugin]
+
+name="Hello Signals plugin"
+description="Showcases how to package a sample Android plugin"
+author="Fredia Huya-Kouadio"
+version=""
+script="hello_signals_plugin.gd"