diff options
Diffstat (limited to 'platform/android')
5 files changed, 32 insertions, 32 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 795a542ed5..3cea8e5c0c 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -205,7 +205,7 @@ static const char *LEGACY_BUILD_SPLASH_IMAGE_EXPORT_PATH = "res/drawable-nodpi-v static const char *SPLASH_BG_COLOR_PATH = "res/drawable-nodpi/splash_bg_color.png"; static const char *LEGACY_BUILD_SPLASH_BG_COLOR_PATH = "res/drawable-nodpi-v4/splash_bg_color.png"; static const char *SPLASH_CONFIG_PATH = "res://android/build/res/drawable/splash_drawable.xml"; -static const char *GDNATIVE_LIBS_PATH = "res://android/build/libs/gdnativelibs.json"; +static const char *GDEXTENSION_LIBS_PATH = "res://android/build/libs/gdextensionlibs.json"; static const int icon_densities_count = 6; static const char *launcher_icon_option = PNAME("launcher_icons/main_192x192"); @@ -2509,7 +2509,7 @@ void EditorExportPlatformAndroid::_clear_assets_directory() { void EditorExportPlatformAndroid::_remove_copied_libs() { print_verbose("Removing previously installed libraries..."); Error error; - String libs_json = FileAccess::get_file_as_string(GDNATIVE_LIBS_PATH, &error); + String libs_json = FileAccess::get_file_as_string(GDEXTENSION_LIBS_PATH, &error); if (error || libs_json.is_empty()) { print_verbose("No previously installed libraries found"); return; @@ -2525,7 +2525,7 @@ void EditorExportPlatformAndroid::_remove_copied_libs() { print_verbose("Removing previously installed library " + libs[i]); da->remove(libs[i]); } - da->remove(GDNATIVE_LIBS_PATH); + da->remove(GDEXTENSION_LIBS_PATH); } String EditorExportPlatformAndroid::join_list(const List<String> &p_parts, const String &p_separator) { @@ -2661,7 +2661,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP return err; } if (user_data.libs.size() > 0) { - Ref<FileAccess> fa = FileAccess::open(GDNATIVE_LIBS_PATH, FileAccess::WRITE); + Ref<FileAccess> fa = FileAccess::open(GDEXTENSION_LIBS_PATH, FileAccess::WRITE); fa->store_string(JSON::stringify(user_data.libs, "\t")); } } else { diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java index bb5042fa09..8ca5bcaa6e 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java +++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java @@ -71,11 +71,11 @@ import javax.microedition.khronos.opengles.GL10; * - 'plugin.init.ClassFullName' is the full name (package + class name) of the plugin class * extending {@link GodotPlugin}. * - * A plugin can also define and provide c/c++ gdnative libraries and nativescripts for the target + * A plugin can also define and provide c/c++ gdextension libraries and nativescripts for the target * app/game to leverage. - * The shared library for the gdnative library will be automatically bundled by the aar build + * The shared library for the gdextension library will be automatically bundled by the aar build * system. - * Godot '*.gdnlib' and '*.gdns' resource files must however be manually defined in the project + * Godot '*.gdextension' resource files must however be manually defined in the project * 'assets' directory. The recommended path for these resources in the 'assets' directory should be: * 'godot/plugin/v1/[PluginName]/' */ @@ -112,7 +112,7 @@ public abstract class GodotPlugin { public final void onRegisterPluginWithGodotNative() { registeredSignals.putAll( registerPluginWithGodotNative(this, getPluginName(), getPluginMethods(), getPluginSignals(), - getPluginGDNativeLibrariesPaths())); + getPluginGDExtensionLibrariesPaths())); } /** @@ -124,7 +124,7 @@ public abstract class GodotPlugin { GodotPluginInfoProvider pluginInfoProvider) { registerPluginWithGodotNative(pluginObject, pluginInfoProvider.getPluginName(), Collections.emptyList(), pluginInfoProvider.getPluginSignals(), - pluginInfoProvider.getPluginGDNativeLibrariesPaths()); + pluginInfoProvider.getPluginGDExtensionLibrariesPaths()); // Notify that registration is complete. pluginInfoProvider.onPluginRegistered(); @@ -132,7 +132,7 @@ public abstract class GodotPlugin { private static Map<String, SignalInfo> registerPluginWithGodotNative(Object pluginObject, String pluginName, List<String> pluginMethods, Set<SignalInfo> pluginSignals, - Set<String> pluginGDNativeLibrariesPaths) { + Set<String> pluginGDExtensionLibrariesPaths) { nativeRegisterSingleton(pluginName, pluginObject); Set<Method> filteredMethods = new HashSet<>(); @@ -176,9 +176,9 @@ public abstract class GodotPlugin { registeredSignals.put(signalName, signalInfo); } - // Get the list of gdnative libraries to register. - if (!pluginGDNativeLibrariesPaths.isEmpty()) { - nativeRegisterGDNativeLibraries(pluginGDNativeLibrariesPaths.toArray(new String[0])); + // Get the list of gdextension libraries to register. + if (!pluginGDExtensionLibrariesPaths.isEmpty()) { + nativeRegisterGDExtensionLibraries(pluginGDExtensionLibrariesPaths.toArray(new String[0])); } return registeredSignals; @@ -304,12 +304,12 @@ public abstract class GodotPlugin { } /** - * Returns the paths for the plugin's gdnative libraries. + * Returns the paths for the plugin's gdextension libraries. * - * The paths must be relative to the 'assets' directory and point to a '*.gdnlib' file. + * The paths must be relative to the 'assets' directory and point to a '*.gdextension' file. */ @NonNull - protected Set<String> getPluginGDNativeLibrariesPaths() { + protected Set<String> getPluginGDExtensionLibrariesPaths() { return Collections.emptySet(); } @@ -420,10 +420,10 @@ public abstract class GodotPlugin { private static native void nativeRegisterMethod(String p_sname, String p_name, String p_ret, String[] p_params); /** - * Used to register gdnative libraries bundled by the plugin. - * @param gdnlibPaths Paths to the libraries relative to the 'assets' directory. + * Used to register gdextension libraries bundled by the plugin. + * @param gdextensionPaths Paths to the libraries relative to the 'assets' directory. */ - private static native void nativeRegisterGDNativeLibraries(String[] gdnlibPaths); + private static native void nativeRegisterGDExtensionLibraries(String[] gdextensionPaths); /** * Used to complete registration of the {@link GodotPlugin} instance's methods. diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java index cfb84c3931..53b78aebfb 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java +++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java @@ -54,12 +54,12 @@ public interface GodotPluginInfoProvider { } /** - * Returns the paths for the plugin's gdnative libraries (if any). + * Returns the paths for the plugin's gdextension libraries (if any). * - * The paths must be relative to the 'assets' directory and point to a '*.gdnlib' file. + * The paths must be relative to the 'assets' directory and point to a '*.gdextension' file. */ @NonNull - default Set<String> getPluginGDNativeLibrariesPaths() { + default Set<String> getPluginGDExtensionLibrariesPaths() { return Collections.emptySet(); } diff --git a/platform/android/plugin/godot_plugin_jni.cpp b/platform/android/plugin/godot_plugin_jni.cpp index 5a7123b833..fe35babba6 100644 --- a/platform/android/plugin/godot_plugin_jni.cpp +++ b/platform/android/plugin/godot_plugin_jni.cpp @@ -128,21 +128,21 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitS singleton->emit_signalp(StringName(signal_name), args, count); } -JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jclass clazz, jobjectArray gdnlib_paths) { - int gdnlib_count = env->GetArrayLength(gdnlib_paths); - if (gdnlib_count == 0) { +JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDExtensionLibraries(JNIEnv *env, jclass clazz, jobjectArray gdextension_paths) { + int gdextension_count = env->GetArrayLength(gdextension_paths); + if (gdextension_count == 0) { return; } - // Retrieve the current list of gdnative libraries. + // Retrieve the current list of gdextension libraries. Array singletons; - if (ProjectSettings::get_singleton()->has_setting("gdnative/singletons")) { - singletons = GLOBAL_GET("gdnative/singletons"); + if (ProjectSettings::get_singleton()->has_setting("gdextension/singletons")) { + singletons = GLOBAL_GET("gdextension/singletons"); } // Insert the libraries provided by the plugin - for (int i = 0; i < gdnlib_count; i++) { - jstring relative_path = (jstring)env->GetObjectArrayElement(gdnlib_paths, i); + for (int i = 0; i < gdextension_count; i++) { + jstring relative_path = (jstring)env->GetObjectArrayElement(gdextension_paths, i); String path = "res://" + jstring_to_string(relative_path, env); if (!singletons.has(path)) { @@ -152,6 +152,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis } // Insert the updated list back into project settings. - ProjectSettings::get_singleton()->set("gdnative/singletons", singletons); + ProjectSettings::get_singleton()->set("gdextension/singletons", singletons); } } diff --git a/platform/android/plugin/godot_plugin_jni.h b/platform/android/plugin/godot_plugin_jni.h index 35f9d5b513..e36cc8b0e3 100644 --- a/platform/android/plugin/godot_plugin_jni.h +++ b/platform/android/plugin/godot_plugin_jni.h @@ -39,7 +39,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterMethod(JNIEnv *env, jclass clazz, jstring sname, jstring name, jstring ret, jobjectArray args); JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSignal(JNIEnv *env, jclass clazz, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_param_types); JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitSignal(JNIEnv *env, jclass clazz, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_params); -JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jclass clazz, jobjectArray gdnlib_paths); +JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDExtensionLibraries(JNIEnv *env, jclass clazz, jobjectArray gdextension_paths); } #endif // GODOT_PLUGIN_JNI_H |