Closed withSang closed 1 month ago
In the issue #627, It seems cmakeListsPath
should be adjusted from generated/jni/CMakeLists.txt
to build/generated/source/codegen/jni/CMakeLists.txt
only when it is a local library.
I tried to correct that by editing the template.
Oh, I see I've made formatting error. I've fixed it again. Sorry.
Thanks a ton for sending this! I totally passed the fact we have a local template option. I've made some changes, let's see if CI passes and we can merge this!
Looks like some options fails but this only happens on CI, some specific templates, and looks like this is a known problem in community CLI https://github.com/react-native-community/cli/issues/2498. So this should be good to merge.
Thank you a lot!! Hope you have a nice day! 👍
Summary
It fixes #627, as we were having the same issue in our react native project. When opting in Turbo Native Modules or Fabric Views,
cmakeListPath
in generatedreact-native.config.js
was not consistent with the hierarchy generated by CodeGen. This fix corrects the path as stated by document.If my fix isn't correct, feel free to correct me. Thank you.
Test plan
npx react-native run-android
to validate the fix was correct.