From f9f8277a0006f21eb7b89bfa559d0c6a0b6f3db7 Mon Sep 17 00:00:00 2001 From: David Angulo Date: Sun, 3 Dec 2023 21:17:34 +0800 Subject: [PATCH] chore: use project identifier instead of generic --- .../templates/cpp-library/android/CMakeLists.txt | 2 +- .../{%- project.package_dir %}/{%- project.name %}Module.java | 2 +- .../{%- project.package_dir %}/{%- project.name %}Module.java | 2 +- .../{%- project.package_dir %}/{%- project.name %}Module.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/create-react-native-library/templates/cpp-library/android/CMakeLists.txt b/packages/create-react-native-library/templates/cpp-library/android/CMakeLists.txt index c648ddbd6..554e8bbd8 100644 --- a/packages/create-react-native-library/templates/cpp-library/android/CMakeLists.txt +++ b/packages/create-react-native-library/templates/cpp-library/android/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.4.1) set (CMAKE_VERBOSE_MAKEFILE ON) set (CMAKE_CXX_STANDARD 11) -add_library(cpp +add_library(<%- project.identifier -%> SHARED ../cpp/<%- project.identifier -%>.cpp cpp-adapter.cpp diff --git a/packages/create-react-native-library/templates/java-library-legacy/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java b/packages/create-react-native-library/templates/java-library-legacy/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java index 98948119c..798e50429 100644 --- a/packages/create-react-native-library/templates/java-library-legacy/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java +++ b/packages/create-react-native-library/templates/java-library-legacy/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java @@ -24,7 +24,7 @@ public String getName() { <% if (project.cpp) { -%> static { - System.loadLibrary("cpp"); + System.loadLibrary("<%- project.identifier -%>"); } private static native double nativeMultiply(double a, double b); diff --git a/packages/create-react-native-library/templates/java-library-mixed/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java b/packages/create-react-native-library/templates/java-library-mixed/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java index 6cb6c2d05..afd27c5c5 100644 --- a/packages/create-react-native-library/templates/java-library-mixed/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java +++ b/packages/create-react-native-library/templates/java-library-mixed/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java @@ -21,7 +21,7 @@ public String getName() { <% if (project.cpp) { -%> static { - System.loadLibrary("cpp"); + System.loadLibrary("<%- project.identifier -%>"); } public static native double nativeMultiply(double a, double b); diff --git a/packages/create-react-native-library/templates/java-library-new/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java b/packages/create-react-native-library/templates/java-library-new/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java index d63e786b9..e9a2e6aaf 100644 --- a/packages/create-react-native-library/templates/java-library-new/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java +++ b/packages/create-react-native-library/templates/java-library-new/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java @@ -21,7 +21,7 @@ public String getName() { <% if (project.cpp) { -%> static { - System.loadLibrary("cpp"); + System.loadLibrary("<%- project.identifier -%>"); } private static native double nativeMultiply(double a, double b);