From f32f5b0022629454e135e3dae3c88d5f2a022466 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Sun, 26 Nov 2023 20:52:54 -0800 Subject: Fix the plugins packaging to address https://github.com/godotengine/godot/issues/85395 --- .../hello_signals_export_plugin.gd | 33 ---------------------- .../hello_signals_plugin_interface.gd | 27 ------------------ .../assets/addons/hello_signals_plugin/plugin.cfg | 7 ----- 3 files changed, 67 deletions(-) delete mode 100644 plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_export_plugin.gd delete mode 100644 plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_plugin_interface.gd delete mode 100644 plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/plugin.cfg (limited to 'plugins/hello_signals/src') diff --git a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_export_plugin.gd b/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_export_plugin.gd deleted file mode 100644 index 6145d44..0000000 --- a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_export_plugin.gd +++ /dev/null @@ -1,33 +0,0 @@ -@tool -extends EditorPlugin - -# A class member to hold the export plugin during its lifecycle -var export_plugin : AndroidExportPlugin - -func _enter_tree(): - # Initialization of the plugin goes here. - export_plugin = AndroidExportPlugin.new() - add_export_plugin(export_plugin) - - -func _exit_tree(): - # Clean-up of the plugin goes here. - remove_export_plugin(export_plugin) - export_plugin = null - - -class AndroidExportPlugin 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/bin/debug/HelloSignals.debug.aar"]) - else: - return PackedStringArray(["hello_signals_plugin/bin/release/HelloSignals.release.aar"]) - - func _get_name(): - return "Hello Signals plugin" diff --git a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_plugin_interface.gd b/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_plugin_interface.gd deleted file mode 100644 index 0cc9c1d..0000000 --- a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/hello_signals_plugin_interface.gd +++ /dev/null @@ -1,27 +0,0 @@ -class_name HelloSignalsPlugin extends Object - -## Interface used to access the functionality provided by the HelloSignals plugin - -var _hello_signals_singleton - -func _init(): - if Engine.has_singleton("HelloSignals"): - _hello_signals_singleton = Engine.get_singleton("HelloSignals") - else: - printerr("Couldn't find HelloSignals singleton") - - -## Register for the tiktok signals emitted -func registerForTikTok(callback: Callable) -> void: - if _hello_signals_singleton: - _hello_signals_singleton.connect("TikTok", callback) - else: - printerr("Unable to register for tiktok") - - -## Start tiktok if not started, otherwise stop it -func toggleTikTok(): - if _hello_signals_singleton: - _hello_signals_singleton.onButtonPressed() - else: - printerr("Unable to toggle tiktok") diff --git a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/plugin.cfg b/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/plugin.cfg deleted file mode 100644 index 4ffab22..0000000 --- a/plugins/hello_signals/src/main/assets/addons/hello_signals_plugin/plugin.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[plugin] - -name="Hello Signals plugin" -description="Showcases how to package a sample Android plugin" -author="Fredia Huya-Kouadio" -version="" -script="hello_signals_export_plugin.gd" -- cgit v1.2.3