-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create-react-native-library@latest: Modify turbo-modules generation #131
Conversation
@Johennes may also be interested in this PR. |
Thanks for taking this one. Looks like a lot of work. 💪 I tested this by regenerating @unomed/react-native-matrix-sdk with create-react-native-library@latest. The example app works for me on iOS but not on Android:
I do have the
I didn't have a lot of time to dig into it tonight sadly. |
Hmm. This is annoying. Could you run this from within your checked out ubrn directory, substituting the variables: ./scripts/test-turbo-modules.sh \
--ubrn-config $YOUR_UBRN_CONFIG_FILE \
--app-tsx $YOUR_APP_TSX_FILE \
--builder-bob-version latest \
--android \
--ios \
--keep-directory-on-exit \
--force-new-directory \
--slug @unomed/react-native-matrix-sdk \
--ios-name ReactNativeMatrixSdk \
"$DIRECTORY" I am a bit confused why you're seeing java files in |
Funnily I had the exact same thought overnight and dug into that this morning. What happened is I wanted to I copied So the issue was entirely on my part, apologies. 🤦♂️ It does feel slightly circular to read the Kotlin flag from a file that ubrn itself generates. I couldn't think of another way to do it either though and if people don't mess up the create-react-native-library generation like I did, things should be fine. I also tested ubrn from this branch on the repo that I had generated with the old create-react-native-library version and things worked fine there on both platforms. Thanks again for making ubrn work with the latest create-react-native-library! |
I did consider checking in package.json for the creat-react-nativw-library version but couldn't see when they'd started adding versions. Also version number sniffing felt too much like useragent sniffing. Thanks so much for re-testing. That is such a relief. |
Could you review this please @zzorba |
…[email protected] (latest) This adds kotlin detection and uses Kotlin if needed, or stays with Java: this adds two Kotlin files and an alternative `build.gradle` file. It also adds more checks to the test-turbo-modules.sh script, tightening up podspec and Objective C files.
e79db28
to
b878f69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I tested this locally and my android build is still working just fine (and I think it uses kotlin).
Fixes #107
Now working with
[email protected]
This adds kotlin detection and uses Kotlin if needed, or stays with Java: this adds two Kotlin files and an alternative
build.gradle
file.It also adds more checks to the test-turbo-modules.sh script, tightening up podspec and Objective C files.
Finally we add documentation to getting-started.md and contributing-turbo-modules.md.