Skip to content

[build-tools] Enable Gradle cache via machine-level gradle.properties to avoid fingerprint mutation#3852

Merged
AbbanMustafa merged 1 commit into
mainfrom
mus/gradle-cache-props
Jun 12, 2026
Merged

[build-tools] Enable Gradle cache via machine-level gradle.properties to avoid fingerprint mutation#3852
AbbanMustafa merged 1 commit into
mainfrom
mus/gradle-cache-props

Conversation

@AbbanMustafa

@AbbanMustafa AbbanMustafa commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Why

Writing org.gradle.caching=true to android/gradle.properties mutates a project file, which affects Expo fingerprinting. This can cause unnecessary cache invalidation and incorrect fingerprint changes. We explored enabling via environment variable #3849 which is still not supported gradle/gradle#18087

How

Enable Gradle build cache by writing to ~/.gradle/gradle.properties (machine-level) instead of android/gradle.properties (project-level). This is functionally equivalent but doesn't touch any project files.

Test Plan

Validated locally and confirmed Gradle cache hits (FROM-CACHE) in the build output, matching the behavior of the current approach.

Screenshot 2026-06-11 at 11 44 38 AM

@github-actions

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

@AbbanMustafa AbbanMustafa added the no changelog PR that doesn't require a changelog entry label Jun 11, 2026
@github-actions

Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

@AbbanMustafa AbbanMustafa requested a review from sjchmiela June 11, 2026 15:34
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.40%. Comparing base (f1aa26d) to head (3107a96).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ild-tools/src/steps/functions/restoreBuildCache.ts 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3852      +/-   ##
==========================================
+ Coverage   58.36%   58.40%   +0.04%     
==========================================
  Files         917      917              
  Lines       39931    39966      +35     
  Branches     8382     8388       +6     
==========================================
+ Hits        23302    23338      +36     
  Misses      15195    15195              
+ Partials     1434     1433       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AbbanMustafa AbbanMustafa merged commit 22fc4da into main Jun 12, 2026
10 of 11 checks passed
@AbbanMustafa AbbanMustafa deleted the mus/gradle-cache-props branch June 12, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants