You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a Java project in Github Actions it is common to use Github's setup-java action to install each version of Java. They are (currently) installed to /opt/hostedtoolcache/jdk/{jdk version}/x64 which is not in the auto detect path for Gradle's toolchain.
So when a build uses toolchains, it will not use the JDK installed by setup-java and will either try to find the required JDKs in the system or download as needed.
Expected Behavior
JDKs installed by setup-java are auto detected.
Current Behavior
Toolchain auto detection does not detect JDKs installed by setup-java.
Context
This affected a project that builds with Java 8 but creates Javadoc with Java 11. Even though we were installing the latest version of 11, the generated Javadoc had a JS resource that was older than the one from 11.0.14.
It would also be nice to have a flag to disable auto detect in places other than the path used by setup-java so this way it would be harder to use an unexpected JDK.
The text was updated successfully, but these errors were encountered:
And you can use org.gradle.java.installations.auto-detect and org.gradle.java.installations.paths (or org.gradle.java.installations.fromEnv) properties to control Gradle's behavior: https://docs.gradle.org/current/userguide/toolchains.html
When running a Java project in Github Actions it is common to use Github's setup-java action to install each version of Java. They are (currently) installed to
/opt/hostedtoolcache/jdk/{jdk version}/x64
which is not in the auto detect path for Gradle's toolchain.So when a build uses toolchains, it will not use the JDK installed by
setup-java
and will either try to find the required JDKs in the system or download as needed.Expected Behavior
JDKs installed by
setup-java
are auto detected.Current Behavior
Toolchain auto detection does not detect JDKs installed by
setup-java
.Context
This affected a project that builds with Java 8 but creates Javadoc with Java 11. Even though we were installing the latest version of 11, the generated Javadoc had a JS resource that was older than the one from 11.0.14.
To investigate why that was happening, I created this repo https://github.com/meiao/expert-octo-toolchain-test/ which has longer description and a workaround.
It would also be nice to have a flag to disable auto detect in places other than the path used by
setup-java
so this way it would be harder to use an unexpected JDK.The text was updated successfully, but these errors were encountered: