Skip to content

fix: remove hardcoded macOS-only org.gradle.java.home from gradle.properties - #2

Merged
pbertsch merged 1 commit into
mainfrom
fix/remove-hardcoded-gradle-java-home
Aug 15, 2026
Merged

pbertsch merged 1 commit into
mainfrom
fix/remove-hardcoded-gradle-java-home

Conversation

@pbertsch

Copy link
Copy Markdown
Member

Summary

android/gradle.properties hardcoded org.gradle.java.home=/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home — a path that only exists on one macOS laptop, never on flutter-probe's Android E2E CI runner (ubuntu-latest). This broke every Android E2E Gradle build with:

* What went wrong:
Value '/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home' given for
org.gradle.java.home Gradle property is invalid (Java home supplied is invalid)

Found immediately after fixing the nightowl_sdk local-path pub-resolution failure over in AlphaWaveSystems/flutter-probe#216 — that fix got the build past flutter pub get (confirmed passing on iOS), which is what exposed this second, independent issue on the Android side.

Removing the hardcoded path lets Gradle fall back to the JAVA_HOME environment variable (or PATH), which is how both CI's actions/setup-java step and any normal local dev setup already provide a JDK. No functional change for anyone who wasn't relying on that one specific hardcoded path.

Test plan

  • flutter build apk --debug --dart-define=PROBE_AGENT=true still succeeds locally with the property removed, resolving a JDK via the normal Flutter/Gradle toolchain lookup
  • Will confirm the Android E2E job actually goes green in flutter-probe's CI once this merges (triggering workflow_dispatch on the e2e.yml workflow there)

…perties

android/gradle.properties hardcoded
org.gradle.java.home=/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home
— a path that only exists on one macOS laptop, never on flutter-probe's
Android E2E CI runner (ubuntu-latest), where it broke every Gradle build
with "Java home supplied is invalid" immediately after fixing the
nightowl_sdk pub-resolution failure (AlphaWaveSystems/flutter-probe#216).

Removing it lets Gradle fall back to the JAVA_HOME environment variable
(or PATH), which is how both CI's actions/setup-java step and any normal
local dev environment already provide a JDK — no functional change for
anyone who wasn't relying on that one specific hardcoded path.

Verified locally: `flutter build apk --debug --dart-define=PROBE_AGENT=true`
still succeeds with the property removed, resolving a JDK via the normal
Flutter/Gradle toolchain lookup instead.
@pbertsch
pbertsch merged commit 260918b into main Aug 15, 2026
1 of 3 checks passed
@pbertsch
pbertsch deleted the fix/remove-hardcoded-gradle-java-home branch August 15, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant