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
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve com.github.ben-manes.caffeine:caffeine:3.1.1.
Required by:
project :
> No matching variant of com.github.ben-manes.caffeine:caffeine:3.1.1 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
- Variant 'apiElements' capability com.github.ben-manes.caffeine:caffeine:3.1.1 declares an API of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
- Variant 'javadocElements' capability com.github.ben-manes.caffeine:caffeine:3.1.1 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them preferably in the form of class files)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
- Variant 'runtimeElements' capability com.github.ben-manes.caffeine:caffeine:3.1.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 11 and the consumer needed a component compatible with Java 8
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
- Variant 'sourcesElements' capability com.github.ben-manes.caffeine:caffeine:3.1.1 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them preferably in the form of class files)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
Previous version 3.1.0 works fine.
The text was updated successfully, but these errors were encountered:
Caffeine 3.x targets Java 11, whereas 2.x targets Java 8. This was highlighted in the release notes.
It looks like the Gradle metadata now enforces the JDK version matches. The 3.1.0 release used Gradle v7.4.2 whereas 3.1.1 used v7.5. You would need to consult them on how to override that to ignore their resolution enforcement.
I hope to softly deprecate Java 8 as it has reached end-of-life in Mar 2022, with critical security updates ending in 2025. A project targeting an old JDK loses out on significant performance, ecosystem compatibility, ect. Therefore 2.x remains supported for critical bug fixes, but users are encouraged to adopt a modern JDK for the general health of their software projects.
I think you were getting a false impression of build compatibility due to #716 (comment). The shadow plugin's metadata (for jmh benchmarks) leaked into the metadata and does not supply the jvm version like the compile and runtime variants do. This allowed the selection to think prior versions were compatible when they were not. If you ran your project on jdk8 with Caffeine it would have failed unless downgrading to v2.x.
Gradle version: 7.4.2
Caffeine version: 3.1.1
Build failed with error details below:
Previous version 3.1.0 works fine.
The text was updated successfully, but these errors were encountered: