3.4.1 Seems to require Java 15, becomes incompatible with lower Java versions
See original GitHub issueI don’t see what in the diff caused the incompatibility https://github.com/jeremymailen/kotlinter-gradle/compare/3.4.0...3.4.1, but when trying to use recent plugin version in an environment with lower java version, it fails with a message similar to:
> Could not resolve all artifacts for configuration ':buildSrc:classpath'.
> Could not resolve org.jmailen.gradle:kotlinter-gradle:3.4.1.
Required by:
project :buildSrc > org.jmailen.kotlinter:org.jmailen.kotlinter.gradle.plugin:3.4.1
> No matching variant of org.jmailen.gradle:kotlinter-gradle:3.4.1 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.0' but:
- Variant 'apiElements' capability org.jmailen.gradle:kotlinter-gradle:3.4.1 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 15 and the consumer needed a runtime of a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.0')
- Variant 'runtimeElements' capability org.jmailen.gradle:kotlinter-gradle:3.4.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 15 and the consumer needed a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.0')
The build passes on Java 15. Sample failed run
I’m quite sure that’s not an expected behavior change so I’m reporting an issue here.
btw. the new Gradle Toolchains feature might be helpful here https://docs.gradle.org/current/userguide/toolchains.html
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Incompatible Java Versions for WindowBuilder - Stack Overflow
I Installed WindowBuilder on Eclipse to create a Graphic User Interface for a program. When I go to the 'Design' tab the following...
Read more >How to Fix UnsupportedClassVersion Error in Java - Rollbar
The UnsupportedClassVersionError in Java occurs when the JVM attempts to read a malformed or otherwise erroneous class file.
Read more >Compatibility Guide for JDK 8 - Oracle
This document discusses types of potential incompatibilities relating to the JDK 8 release of the Java platform.
Read more >Building Java & JVM projects - Gradle User Manual
The simplest build script for a Java project applies the Java Library Plugin and optionally sets the project version and selects the Java...
Read more >Update Java runtime settings on Windows
In the Java Control Panel, click on the Java tab. Verify that the latest Java Runtime version is enabled by checking the Enabled...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you, this is helpful. I guess now jar compatibility requires more than just bytecode – declaring which JDK apis are required by the component. Will try to fix tomorrow.
Thanks! I can confirm it works, even on Java 8 🚀