-
Notifications
You must be signed in to change notification settings - Fork 600
fix(android): update build.gradle for RN 0.74+ compatibility #577
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
fix(android): update build.gradle for RN 0.74+ compatibility #577
Conversation
|
thank you @1mehdifaraji! added a revive tag, I will merge this in once I upgrade the repo's tooling |
|
@greptile review |
Greptile SummaryThis PR modernizes the Android build configuration for React Native 0.74+ by removing the outdated Key Changes:
Impact:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant RootProject as Root Project build.gradle
participant LibModule as Library Module build.gradle
participant AGP as Android Gradle Plugin
participant Gradle as Gradle 8.x
Note over RootProject,Gradle: Before: Hardcoded AGP 7.2.1
RootProject->>LibModule: buildscript block executes
LibModule->>AGP: Force download AGP 7.2.1
AGP-->>LibModule: TLS handshake failures (via proxy/VPN)
LibModule->>Gradle: Attempt build
Gradle-->>LibModule: Resource merging errors (missing packaging config)
Note over RootProject,Gradle: After: Inherit Modern AGP
RootProject->>LibModule: Apply plugins (com.android.library, kotlin-android)
LibModule->>AGP: Inherit AGP version from root (8.x+)
AGP-->>LibModule: Modern AGP loaded successfully
LibModule->>Gradle: Build with packaging excludes
Note over LibModule,Gradle: packaging.resources.excludes handles META-INF conflicts
Gradle-->>LibModule: Build succeeds cleanly
|
Greptile found no issues!From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
# [3.3.0](v3.2.4...v3.3.0) (2025-12-27) ### Bug Fixes * **android:** update build.gradle for RN 0.74+ compatibility ([#577](#577)) ([13f6dce](13f6dce)) * **Expo:** Config plugin setup ([#543](#543)) ([c33c67d](c33c67d)) * fix illegal type in boxed expression ([#452](#452)) ([32aab8b](32aab8b)) * **ios:** correctly link frameworks required ([#535](#535)) ([2a7d27a](2a7d27a)) ### Features * **iOS:** Enable file transcriptions ([#409](#409)) ([03da891](03da891))
This PR updates
android/build.gradleto resolve common build issues in modern React Native versions (0.74+):buildscriptblock, which forces downloading AGP 7.2.1 (causing TLS handshake failures via proxies/VPNs). Now inherits the root project's modern AGP (8.x+).packagingoptions to fix resource merging errors in Gradle 8+ (e.g., duplicate META-INF files).Tested on RN 0.75: Builds cleanly without patches.
Please consider publishing a new npm version after merge (last release was v3.2.4 in 2022—many users install from GitHub master due to outdated npm).