Skip to content

feat: support local BGP in Expo config plugin#402

Open
artus9033 wants to merge 17 commits into
mainfrom
feat/expo-local-bgp
Open

feat: support local BGP in Expo config plugin#402
artus9033 wants to merge 17 commits into
mainfrom
feat/expo-local-bgp

Conversation

@artus9033

Copy link
Copy Markdown
Collaborator

Summary

Support local BGP in Expo config plugin with new option useLocalGradlePlugin, available both in the config file & Expo config plugin options.

Test plan

CI green.

@artus9033 artus9033 requested review from hurali97 and krozniata June 25, 2026 21:04
@artus9033 artus9033 self-assigned this Jun 25, 2026
Copilot AI review requested due to automatic review settings June 25, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the @callstack/react-native-brownfield Expo config plugin to support loading the Brownfield Gradle plugin locally (via includeBuild) and introduces a unified configuration flow where the Expo plugin can resolve options from brownfield.config.* / package.json#brownfield as well as legacy app.json plugin props.

Changes:

  • Add useLocalGradlePlugin option and wire it through Expo Android prebuild Gradle modifications (settings.gradle includeBuild + skipping Maven classpath injection).
  • Introduce a shared “Expo plugin config resolution” module in @callstack/brownfield-cli and update the Expo plugin to consume it (plus overlap protection between file config and plugin props).
  • Update CLI config loading semantics (loadBrownfieldConfig can return null), schema/types/docs, and migrate an example app config to brownfield.config.json.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/react-native-brownfield/src/expo-config-plugin/withBrownfield.ts Switch Expo plugin config resolution to shared CLI resolver + overlap guard.
packages/react-native-brownfield/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts Add useLocalGradlePlugin option to Android plugin config type.
packages/react-native-brownfield/src/expo-config-plugin/android/withBrownfieldAndroid.ts Pass useLocalGradlePlugin into Gradle modification helpers.
packages/react-native-brownfield/src/expo-config-plugin/android/utils/gradleHelpers.ts Implement includeBuild insertion + skip Maven classpath when local plugin enabled.
packages/react-native-brownfield/src/expo-config-plugin/android/utils/tests/gradleHelpers.test.ts Add unit tests covering the new Gradle helper behavior.
packages/react-native-brownfield/src/expo-config-plugin/android/tests/withAndroidModuleFiles.test.ts Extend fixture config with useLocalGradlePlugin.
packages/cli/src/types.ts Add Expo-only nested config types (android.expo, ios.expo) incl. useLocalGradlePlugin.
packages/cli/src/expoPluginConfig.ts New shared resolver/overlap-check module for Expo config plugin consumption.
packages/cli/src/config.ts Make loadBrownfieldConfig return `BrownfieldConfig
packages/cli/src/brownie/config.ts Handle loadBrownfieldConfig() possibly returning null.
packages/cli/src/brownie/tests/config.test.ts Adjust tests for config loading behavior changes.
packages/cli/src/brownfield/utils/project.ts Refine Expo project detection and error behavior when app config exists but Expo config parsing fails.
packages/cli/src/brownfield/commands/publishAndroid.ts Run Expo prebuild earlier and adjust project root handling.
packages/cli/src/brownfield/commands/packageIos.ts Run Expo prebuild earlier and adjust project root handling.
packages/cli/src/brownfield/commands/packageAndroid.ts Run Expo prebuild earlier and adjust project root handling.
packages/cli/src/brownfield/commands/tests/packageIos.action.test.ts Update mocks and assertions for adjusted package:ios command flow.
packages/cli/src/tests/expoPluginConfig.test.ts Add tests for overlap detection + resolver mapping across config sources.
packages/cli/src/tests/config.test.ts Update tests for loadBrownfieldConfig returning null when no source exists.
packages/cli/schema.json Add android.expo / ios.expo schema definitions incl. useLocalGradlePlugin.
packages/cli/package.json Export new ./expo-plugin-config entrypoint.
docs/docs/docs/getting-started/ios.mdx Rename referenced config file to brownfield.config.json.
docs/docs/docs/getting-started/expo.mdx Document preference for config file, overlap warning, and useLocalGradlePlugin.
docs/docs/docs/getting-started/android.mdx Rename referenced config file to brownfield.config.json.
docs/docs/docs/api-reference/configuration.mdx Document Expo project config sharing and android.expo.* / ios.expo.* layout.
apps/ExpoApp55/package.json Remove inline brownfield config block from package.json.
apps/ExpoApp55/brownfield.config.json Add dedicated Brownfield config file for the example Expo app.
apps/ExpoApp55/app.json Register plugin without options (config comes from file).
apps/ExpoApp54/app.json Register plugin without options.
.changeset/vast-waves-itch.md Changeset for local BGP support in Expo plugin.
.changeset/nine-mice-fall.md Changeset for unified config file support in Expo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/docs/docs/api-reference/configuration.mdx
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