Fix: Configure Gradle to use Java 11 for Android build#148
Open
klb2006 wants to merge 1 commit intoArgusoftOpen:mainfrom
Open
Fix: Configure Gradle to use Java 11 for Android build#148klb2006 wants to merge 1 commit intoArgusoftOpen:mainfrom
klb2006 wants to merge 1 commit intoArgusoftOpen:mainfrom
Conversation
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
The Android Gradle plugin requires Java 11+. This change ensures the
medplat-androidbuild uses Java 11 by adding an explicit Gradle Java home configuration.Changes
medplat-android/gradle.properties:org.gradle.java.home=C:/Program Files/Java/jdk-11.0.20Why
When Gradle runs with Java 8 the Android plugin fails during project evaluation:
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.This prevents the
medplat-androidmodule from building. Addingorg.gradle.java.homepoints Gradle at a Java 11 installation so the Android build can run in CI or locally without JVM mismatch issues.Testing
(On Windows:
gradlew.bat assembleDebug)Notes & Compatibility
org.gradle.java.homepath is an environment-specific pointer. Please adjust the path to match the JDK location on your machine/CI.JAVA_HOMEto a JDK 11+ installation instead of relying on this property.medplat-web,medplat-ui) which are unaffected.Follow-up
org.gradle.java.homein CI.