[build-tools] Make configure-version gradle script compatible with AGP 9 - #4155
[build-tools] Make configure-version gradle script compatible with AGP 9#4155gabrieldonadel wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4155 +/- ##
=======================================
Coverage 62.47% 62.47%
=======================================
Files 1008 1008
Lines 45772 45772
Branches 9631 9631
=======================================
Hits 28590 28590
Misses 15721 15721
Partials 1461 1461 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
7d28abf to
853c234
Compare
|
✅ Thank you for adding the changelog entry! |
🤖 AI code reviewDecision: Approve Overall PR risk: High. The change modifies existing behavior: the generated No findings. This review is advisory — it never blocks a merge and never auto-approves. |
Why
EAS injects an
eas-build.gradlescript into Android projects to setversionCodeandversionNamefrom the build job. That script sets per-output overrides throughapplicationVariants.all. AGP 9 removes theapplicationVariantsAPI from the new DSL, so the injected script breaks the Gradle configuration for project using react-native 0.87How
The
defaultConfigassignments stay unchanged. The per-output override block moves out of theandroid {}block and now picks an API at runtime:androidextension still exposesapplicationVariants(AGP 8 and older), the script keeps the existingversionCodeOverride/versionNameOverridepath.androidComponents.onVariantsvariant API and sets theversionCode/versionNameproperties on each output.Test Plan
CI should be green