Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

expo-brownfield rootProject.name Maven validation bug — minimal reproducer

expo prebuild writes rootProject.name = '<config.name>' into android/settings.gradle. Autolinked RN libraries that don't declare a group inherit rootProject.name as their default Gradle project.group. When the brownfield publish flow runs, Maven rejects any display name containing spaces or other non-[A-Za-z0-9_\-.] characters.

Reproduce

bunx create-expo-app@latest app --template default@sdk-55 --no-install
# In app/app.json: set expo.name to "Brownfield Demo" (any string with a space),
# set expo.android.package to "com.example.brownfielddemo",
# and add "expo-brownfield" to plugins.
cd app
bun install
bun add expo-brownfield@~55.0.24 react-native-mmkv
bunx expo prebuild --clean --platform android
bunx expo-brownfield build:android --repo MavenLocal -r --verbose

Error

> Task :react-native-safe-area-context:publishBrownfieldReleasePublicationToMavenLocal FAILED
> Invalid publication 'brownfieldRelease': groupId (Brownfield Demo) is not a valid Maven identifier ([A-Za-z0-9_\-.]+).

Fix options

Override rootProject.name when the brownfield config plugin is active:

  1. config.slug (preferred) — required, URL-safe, strict subset of Maven groupId regex; matches semantic intent.
  2. config.android.package — Maven-valid but conflates Gradle root name with Java package namespace.
  3. Sanitize config.name — heuristic transformation.

Environment

  • expo-brownfield 55.0.24, Expo SDK 55, react-native 0.83.6, Gradle 9.0.0
  • macOS 26.4.1, Node 22.22.2

About

Minimal reproducer for expo-brownfield Android publish bug where rootProject.name (set from app display name) breaks Maven groupId validation for autolinked libs without explicit group

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages