fix: remove hardcoded macOS-only org.gradle.java.home from gradle.properties - #2
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
android/gradle.propertieshardcodedorg.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:Found immediately after fixing the
nightowl_sdklocal-path pub-resolution failure over in AlphaWaveSystems/flutter-probe#216 — that fix got the build pastflutter 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_HOMEenvironment variable (orPATH), which is how both CI'sactions/setup-javastep 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=truestill succeeds locally with the property removed, resolving a JDK via the normal Flutter/Gradle toolchain lookupworkflow_dispatchon thee2e.ymlworkflow there)