Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kluent-1.69 is configured for jvm version 17 #218

Closed
ursjoss opened this issue Oct 14, 2022 · 3 comments · Fixed by #219
Closed

kluent-1.69 is configured for jvm version 17 #218

ursjoss opened this issue Oct 14, 2022 · 3 comments · Fixed by #219

Comments

@ursjoss
Copy link
Contributor

ursjoss commented Oct 14, 2022

Pulling in kluent 1.69 into a project that builds against a java version less than 17 currenlty breaks with the following message:

Stacktrace
FAILURE: Build failed with an exception.
  • What went wrong:
    Could not determine the dependencies of task ':kris-core:test'.

Could not resolve all task dependencies for configuration ':kris-core:testRuntimeClasspath'.
Could not resolve org.amshove.kluent:kluent:1.69.
Required by:
project :kris-core
> No matching variant of org.amshove.kluent:kluent:1.69 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, 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 org.amshove.kluent:kluent:1.69 declares a library, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm':
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Variant 'javadocElements' capability org.amshove.kluent:kluent:1.69 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 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
- Variant 'runtimeElements' capability org.amshove.kluent:kluent:1.69 declares a runtime of a library, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm':
- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Variant 'sourcesElements' capability org.amshove.kluent:kluent:1.69 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 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')

The root cause is most likely that attribute variants.attributes."org.gradle.jvm.version" in kluent-1.69.module is set to 17:
image

The java version compatibility for the module declaration should presumably be set to 1.6/1.8 as you already do e.g. for tasks of type compileKotin setting jvmTarget.

@MarkusAmshove
Copy link
Owner

Thank you for raising this, I guess setting the target version doesn't do it anymore.
I had to redo the publishing for 1.69.
I'll have a closer look and fix it

@MarkusAmshove
Copy link
Owner

This should now be fixed with 1.70, you can give it a try.
The version should show up in mavencentral in a a bit (takes around 10 minutes to 1 hour :))

@ursjoss
Copy link
Contributor Author

ursjoss commented Oct 16, 2022

Works perfectily with 1.70. Thanks a lot for the quick fix.

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 a pull request may close this issue.

2 participants