Skip to content

Run Android release bundling on a Gradle worker - #60601

Draft
roryabraham wants to merge 1 commit into
react:mainfrom
roryabraham:perf/android-bundle-worker
Draft

roryabraham wants to merge 1 commit into
react:mainfrom
roryabraham:perf/android-bundle-worker

Conversation

@roryabraham

Copy link
Copy Markdown

Summary:

Run the Android bundle task's external commands as one no-isolation Gradle work item. This releases the project lock while the bundler, Hermes and source-map composer run, allowing independent tasks in the Android project to proceed. Consumers still wait for task completion and receive the same outputs and failures.

Hermes lookup remains after bundling, and command order and output paths are preserved. In a downstream clean two-ABI build on React Native 0.88.1, CMake overlapped bundling for 98.72s and wall time fell from 516.11s to 451.60s. Downstream measurements and artifact checks.

Related: #60600

Changelog:

[ANDROID] [CHANGED] - Allow independent Android build tasks to run while the JavaScript bundle task executes external commands.

Test Plan:

  • From packages/gradle-plugin, ran ./gradlew :react-native-gradle-plugin:test --tests 'com.facebook.react.tasks.BundleHermesCTaskTest*' --no-daemon with JDK 17: 17 tests passed.
  • Ran the pinned ktfmt 0.59 formatter check for BundleHermesCTask.kt.
  • Used an isolated Gradle project with this checkout as its included plugin. ./gradlew --offline --no-daemon noHermes hermesWithoutMaps hermesWithMaps passed with fixture bundler and compiler executables. missingHermes failed as expected after producing JavaScript.
  • Ran the issue's project-lock reproducer with Gradle 9.4.1: the independent task waited until the synchronous action finished and ran before the worker completed with -Pworker.
  • Full native APK timing and parity were measured on the downstream 0.88.1 port. A full Android build was not repeated against upstream main.

@github-actions github-actions Bot added the Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. label Dec 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant