Skip to content

Commit 8b8fb76

Browse files
feat: update nitro-modules template to new format (#935)
<!-- Please provide enough information so that others can review your pull request. --> <!-- Keep pull requests small and focused on a single change. --> ### Summary This updates the nitro modules to follow new template <!-- What existing problem does the pull request solve? Can you solve the issue with a different approach? --> ### Test plan <!-- List the steps with which we can test this change. Provide screenshots if this changes anything visual. --> Can be tested by creating a new nitro modules
1 parent 26b04c9 commit 8b8fb76

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export const FALLBACK_BOB_VERSION = '0.41.0';
2-
export const FALLBACK_NITRO_MODULES_VERSION = '0.35.2';
2+
export const FALLBACK_NITRO_MODULES_VERSION = '0.35.3';
33
export const SUPPORTED_MONOREPO_CONFIG_VERSION = '0.3.3';
44
export const SUPPORTED_REACT_NATIVE_VERSION = '0.83.0';
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include <jni.h>
22
#include "<%- project.package_cpp -%>OnLoad.hpp"
33

4+
#include <fbjni/fbjni.h>
5+
6+
47
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
5-
return margelo::nitro::<%- project.package_cpp -%>::initialize(vm);
6-
}
8+
return facebook::jni::initialize(vm, []() {
9+
margelo::nitro::<%- project.package_cpp -%>::registerAllNatives();
10+
});
11+
}

0 commit comments

Comments
 (0)