Skip to content

Fix: Configure Gradle to use Java 11 for Android build#148

Open
klb2006 wants to merge 1 commit intoArgusoftOpen:mainfrom
klb2006:fix/gradle-java11
Open

Fix: Configure Gradle to use Java 11 for Android build#148
klb2006 wants to merge 1 commit intoArgusoftOpen:mainfrom
klb2006:fix/gradle-java11

Conversation

@klb2006
Copy link
Copy Markdown

@klb2006 klb2006 commented Mar 3, 2026

Summary

The Android Gradle plugin requires Java 11+. This change ensures the medplat-android build uses Java 11 by adding an explicit Gradle Java home configuration.

Changes

  • Updated medplat-android/gradle.properties:
    • Added org.gradle.java.home=C:/Program Files/Java/jdk-11.0.20

Why

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-android module from building. Adding org.gradle.java.home points Gradle at a Java 11 installation so the Android build can run in CI or locally without JVM mismatch issues.

Testing

  1. Ensure JDK 11 is installed on your machine (or CI image).
  2. From repo root run:
    (On Windows: gradlew.bat assembleDebug)
  3. Build should start and proceed past project evaluation (no Java 11 error).

Notes & Compatibility

  • The org.gradle.java.home path is an environment-specific pointer. Please adjust the path to match the JDK location on your machine/CI.
  • Alternatively, users may set JAVA_HOME to a JDK 11+ installation instead of relying on this property.
  • This change is non-breaking for other modules (medplat-web, medplat-ui) which are unaffected.

Follow-up

  • If maintainers prefer not to hardcode a machine-specific path, we can remove this change and instead update the repo README/CI config to require JDK 11 or set org.gradle.java.home in CI.

@klb2006 klb2006 closed this Mar 3, 2026
@klb2006 klb2006 reopened this Mar 3, 2026
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