diff options
author | Fredia Huya-Kouadio <fhuya@meta.com> | 2023-11-26 21:30:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-26 21:30:48 -0800 |
commit | c8ef744880f82855cff68d941980fb399c4b2212 (patch) | |
tree | e26fca3a65bf4ce1b2ed76e6814b3c7419388868 /plugins/hello_world/src | |
parent | 09386ad9c0070fcaa47262ea6a73542cf8fa2d57 (diff) | |
parent | f32f5b0022629454e135e3dae3c88d5f2a022466 (diff) | |
download | godot-android-samples-c8ef744880f82855cff68d941980fb399c4b2212.tar.gz godot-android-samples-c8ef744880f82855cff68d941980fb399c4b2212.tar.bz2 godot-android-samples-c8ef744880f82855cff68d941980fb399c4b2212.zip |
Merge pull request #5 from m4gr3d/fix_export_scripts_packaging
Update the logic to package the plugins
Diffstat (limited to 'plugins/hello_world/src')
3 files changed, 0 insertions, 58 deletions
diff --git a/plugins/hello_world/src/main/assets/addons/hello_world_plugin/hello_world_export_plugin.gd b/plugins/hello_world/src/main/assets/addons/hello_world_plugin/hello_world_export_plugin.gd deleted file mode 100644 index 7158c03..0000000 --- a/plugins/hello_world/src/main/assets/addons/hello_world_plugin/hello_world_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_world_plugin/bin/debug/HelloWorld.debug.aar"]) - else: - return PackedStringArray(["hello_world_plugin/bin/release/HelloWorld.release.aar"]) - - func _get_name(): - return "HelloWorldPlugin" diff --git a/plugins/hello_world/src/main/assets/addons/hello_world_plugin/hello_world_plugin_interface.gd b/plugins/hello_world/src/main/assets/addons/hello_world_plugin/hello_world_plugin_interface.gd deleted file mode 100644 index ed84ef3..0000000 --- a/plugins/hello_world/src/main/assets/addons/hello_world_plugin/hello_world_plugin_interface.gd +++ /dev/null @@ -1,18 +0,0 @@ -class_name HelloWorldPlugin extends Object - -## Interface used to access the functionality provided by this plugin - -var _hello_world_singleton - -func _init(): - if Engine.has_singleton("HelloWorld"): - _hello_world_singleton = Engine.get_singleton("HelloWorld") - else: - printerr("Initialization error: unable to access the java logic") - -## Toggle between showing and hiding the hello world text -func helloWorld(): - if _hello_world_singleton: - _hello_world_singleton.helloWorld() - else: - printerr("Initialization error") diff --git a/plugins/hello_world/src/main/assets/addons/hello_world_plugin/plugin.cfg b/plugins/hello_world/src/main/assets/addons/hello_world_plugin/plugin.cfg deleted file mode 100644 index f83f716..0000000 --- a/plugins/hello_world/src/main/assets/addons/hello_world_plugin/plugin.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[plugin] - -name="HelloWorldPlugin" -description="Sample to showcase how to package a Godot Android plugin " -author="Fredia Huya-Kouadio (m4gr3d)" -version="" -script="hello_world_export_plugin.gd" |