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

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

Open
solvingj opened this issue Dec 30, 2023 · 1 comment

Comments

@solvingj
Copy link

solvingj commented Dec 30, 2023

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:
@bolt-daniil-popov
Copy link

Hello, @solvingj!
I got the same issue but solved it by using Java 17 which is required by the plugin.

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

No branches or pull requests

2 participants