Skip to content

Commit b56706b

Browse files
authored
fix(crnl): fix nitro modules android template (#765)
<!-- Please provide enough information so that others can review your pull request. --> <!-- Keep pull requests small and focused on a single change. --> ### Summary Android doesn't build at the moment when choosing the new nitro modules implementation. These changes fixed my issues.
1 parent 78cb910 commit b56706b

File tree

2 files changed

+2
-2
lines changed
  • packages/create-react-native-library/templates

2 files changed

+2
-2
lines changed

packages/create-react-native-library/templates/native-common/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ buildscript {
1515
}
1616
}
1717

18-
<% if (project.cpp) { -%>
18+
<% if (project.cpp || project.moduleConfig === 'nitro-modules') { -%>
1919
def reactNativeArchitectures() {
2020
def value = rootProject.getProperties().get("reactNativeArchitectures")
2121
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]

packages/create-react-native-library/templates/nitro-module/android/src/main/java/com/margelo/nitro/{%- project.package_dir %}/{%- project.name %}.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.margelo.nitro.<%- project.package %>
22

33
@DoNotStrip
4-
class CrnlNitro : Hybrid<%- project.name %>Spec() {
4+
class <%- project.name %> : Hybrid<%- project.name %>Spec() {
55
override fun multiply(a: Double, b: Double): Double {
66
return a * b
77
}

0 commit comments

Comments
 (0)