question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publish using Java14 makes artifacts unusable on Java11

See original GitHub issue
* What went wrong:
A problem occurred configuring root project 'cash'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve com.squareup.sqldelight:gradle-plugin:1.5.0-benoit03.
     Required by:
         project :
      > No matching variant of com.squareup.sqldelight:gradle-plugin:1.5.0-benoit03 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 but:
          - Variant 'apiElements' capability com.squareup.sqldelight:gradle-plugin:1.5.0-benoit03 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 14 and the consumer needed a runtime of a component compatible with Java 11
          - Variant 'runtimeElements' capability com.squareup.sqldelight:gradle-plugin:1.5.0-benoit03 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 14 and the consumer needed a component compatible with Java 11

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
3flexcommented, Feb 21, 2021

if (plugins.hasPlugin("org.jetbrains.kotlin.jvm")) doesn’t work as intended - because the root project’s allprojects block is evaluated before the subprojects’ build scripts, hasPlugin(...) is always false because the plugin hasn’t been applied in the subproject yet.

The block should be changed to:

  plugins.withId("org.jetbrains.kotlin.jvm") {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
  }

I don’t know if this actually helps the original issue, which I experienced too but couldn’t find the root cause of - but just as an FYI.

0reactions
JakeWhartoncommented, Feb 21, 2021

Good catch! Want to send a PR for that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

JDK 11 Release Notes, Important Changes, and Information
Introduction. The Release Notes describe important changes, enhancements, removed APIs and features, deprecated APIs and features, and other information ...
Read more >
Pipeline - Publish to Java Dev Feed will faill when retry · Issue ...
The pipeline will fail, complaining there's a conflict of artifact (since the first one has already been transferred successfully). So there's ...
Read more >
Build and deploy javafx application using java11
So, first make a new Java class something like Start.java - this links to ... Artifacts -> + -> javaFx Application -> from...
Read more >
Files exists but can't be used to build artifacts. (#15530) - GitLab
I want to create build artifacts, but Gitlab CI keeps telling me no matching files, although I explicitly check if the files exists....
Read more >
How to Publish a Java Library to Maven Central - YouTube
Overview of releasing a Java Maven project to Maven Central to share it with the rest of the world.There are a few extra...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found