Skip to content

Commit 8fda2fd

Browse files
authored
refactor: use project identifier instead of generic (#501)
### Summary Doesn't really fix/improve anything, just a nitpick. `cpp` seems too generic. Just close if it's not a welcome change. Thanks! ### Test plan ``` yarn example android ```
1 parent 6780418 commit 8fda2fd

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/create-react-native-library/templates/cpp-library/android/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.4.1)
33
set (CMAKE_VERBOSE_MAKEFILE ON)
44
set (CMAKE_CXX_STANDARD 11)
55

6-
add_library(cpp
6+
add_library(<%- project.identifier -%>
77
SHARED
88
../cpp/<%- project.identifier -%>.cpp
99
cpp-adapter.cpp

packages/create-react-native-library/templates/java-library-legacy/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public String getName() {
2424

2525
<% if (project.cpp) { -%>
2626
static {
27-
System.loadLibrary("cpp");
27+
System.loadLibrary("<%- project.identifier -%>");
2828
}
2929

3030
private static native double nativeMultiply(double a, double b);

packages/create-react-native-library/templates/java-library-mixed/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public String getName() {
2121

2222
<% if (project.cpp) { -%>
2323
static {
24-
System.loadLibrary("cpp");
24+
System.loadLibrary("<%- project.identifier -%>");
2525
}
2626

2727
public static native double nativeMultiply(double a, double b);

packages/create-react-native-library/templates/java-library-new/android/src/main/java/com/{%- project.package_dir %}/{%- project.name %}Module.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public String getName() {
2121

2222
<% if (project.cpp) { -%>
2323
static {
24-
System.loadLibrary("cpp");
24+
System.loadLibrary("<%- project.identifier -%>");
2525
}
2626

2727
private static native double nativeMultiply(double a, double b);

0 commit comments

Comments
 (0)