Skip to content
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

Basekit #598

Merged
merged 16 commits into from
Sep 20, 2023
Merged

Basekit #598

merged 16 commits into from
Sep 20, 2023

Conversation

CedricGuillemet
Copy link
Contributor

@CedricGuillemet CedricGuillemet commented Sep 7, 2023

Some partners do not use XR/Camera but because it's in the binary, apps needs permission. Moreover, asking for permission while not using the feature is sufficient to be rejected by the store.
We need to provide a way to not use these feature. Doing it at realtime means permission is still needed and, I guess, a binary import check is also performed when uploading to the store.
The approach here is to release a new package per platform/RN version, suffixed with basekit.
The equivalent basekit of @babylonjs/react-native-windows-0-71 is @babylonjs/react-native-basekit-windows-0-71
In order to not explode build times (they are already way too big), per platform/RN version, build steps are added in gulp instead of adding new jobs.
Basically, BRN is built as before, then, some flags are changed and a private preprocessor is added to BabylonReactNative project to not compile with XR/NativeCamera. Another build happens and binaries are copied to a different Assembled directory.
Then, 2 artifacts and packages are published.

Note: Plan for the future is to remove the legacy NPM packages and replace them with BaseKit ones + 1 package per feature (XR, Camera,...)

Both BaseKit and 'FullKit' contain same files. NativeCamera and XR libraries/headers will be present in the NPM. This is for ease of development/maintenance. Difference is only done at BabylonNative compilation and therefore, at link for any users.

There is a lot of copy/paste in the GitHub Action jobs that will be addressed in a following PR.

@CedricGuillemet CedricGuillemet marked this pull request as ready for review September 8, 2023 17:14
Package/gulpfile.js Outdated Show resolved Hide resolved
@ryantrem
Copy link
Member

I know you mentioned deduping copy/paste in GitHub Actions, I imagine we could also remove some of the duplication in gradle files, pod files, etc. as well. Not sure how much effort is worth putting into that if there is a broader plan for better modularization, but also not sure when that will happen, so hopefully in the meantime we keep the maintenance burden in check.

Co-authored-by: Ryan Tremblay <[email protected]>
@CedricGuillemet CedricGuillemet merged commit 2735074 into BabylonJS:master Sep 20, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants