Skip to content

Possible Gradle Plugin Error due to JDK variant incompatibility with transitive deps #320

Open
@solvingj

Description

@solvingj

I'm new to this project and ecosystem, so apologies in advance if it's my own environment that's causing this.

I cloned the project on my intel mac Sonoma with JDK 11, opened with latest version of Jetbrains Fleet and got the errors below.

Based on the error, I don't think my version of JDK matters, but just to try something, I installed JDK 17 then closed everything and tried again. Got the same errors.

If it's a real case where some "latest version of a transitive dependency" specifies a real incompatibility, consider adding "lockfiles" so the samples always work.

<-------------> 0% CONFIGURING [290ms]
> root project > Resolve dependencies of :classpath

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'PeopleInSpace'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve app.cash.sqldelight:gradle-plugin:2.0.1.
     Required by:
         project : > app.cash.sqldelight:app.cash.sqldelight.gradle.plugin:2.0.1
      > No matching variant of app.cash.sqldelight:gradle-plugin:2.0.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.4' but:
          - Variant 'apiElements' capability app.cash.sqldelight:gradle-plugin:2.0.1 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.4')
          - Variant 'runtimeElements' capability app.cash.sqldelight:gradle-plugin:2.0.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions