Skip to content

Conversation

@hurali97
Copy link
Member

@hurali97 hurali97 commented Jul 11, 2025

Summary

This PR adds support for Expo projects. The changes in this PR relates to embedding the Expo third party dependencies or libraries in the brownfield module AAR. Without this change, there will be a crash at the run-time when react-native tries to invoke ExpoModules which in turn look for its libraries like expo-image and if it will not be provided with the AAR then a crash will happen, since the classes won't be resolved.

We achieve this solution by evaluating the dependencies associated with expo project. What this means is that internally expo gradle plugin adds their third party dependencies using api and host these either in a local maven repo OR as a subproject. Since, expo project is linked in settings.gradle file it is available for the brownfield module.

Hence we evaluate the expo project and get its dependencies. Then we embed these dependencies for the brownfield module.

The above changes can be opted in by:

reactBrownfield {
    isExpo = true
}

Test plan

Tested these changes on both Expo and bare RN projects - 🟢

@hurali97 hurali97 marked this pull request as ready for review July 14, 2025 07:42
@hurali97 hurali97 merged commit 90f5a65 into main Jul 15, 2025
3 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.

3 participants