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

Cant apply Kotlin Gradle plugin v1.7.20 on JDK 19 #22440

Closed
daniel-jasinski opened this issue Oct 18, 2022 · 4 comments
Closed

Cant apply Kotlin Gradle plugin v1.7.20 on JDK 19 #22440

daniel-jasinski opened this issue Oct 18, 2022 · 4 comments
Labels
closed:invalid Not applicable to Gradle or EOL version

Comments

@daniel-jasinski
Copy link

When using the latest nightly build of Gradle with the latest Kotlin version (1.7.20) on JDK 19 build fails during Kotlin plugin dependency resolution.

Expected Behavior

Gradle should be able to configure the project on JDK 19 with Kotlin 1.7.20.

Current Behavior

Project configuration fails with the following errors:

A problem occurred configuring project ':buildInclude'.
Could not determine the dependencies of null.
Could not resolve all task dependencies for configuration ':buildInclude:classpath'.
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20.
Required by:
project :buildInclude > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.20 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20
> Multiple incompatible variants of org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 were selected:
- Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle70RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.0, org.gradle.status=release, org.gradle.usage=java-runtime}
- Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle71RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.1, org.gradle.status=release, org.gradle.usage=java-runtime}
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20.
Required by:
project :buildInclude > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.20 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20
project :buildInclude > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.20 > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20 > org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.7.20
> Multiple incompatible variants of org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 were selected:
- Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle70RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.0, org.gradle.status=release, org.gradle.usage=java-runtime}
- Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle71RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.1, org.gradle.status=release, org.gradle.usage=java-runtime}
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.10.
Required by:
project :buildInclude > org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:2.4.1 > org.gradle.kotlin:gradle-kotlin-dsl-plugins:2.4.1 > org.jetbrains.kotlin:kotlin-sam-with-receiver:1.7.10
> Multiple incompatible variants of org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 were selected:
- Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle70RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.0, org.gradle.status=release, org.gradle.usage=java-runtime}
- Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle71RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.1, org.gradle.status=release, org.gradle.usage=java-runtime}

Your Environment

OS: Windows 10
JDK: OpenJDK 19
Gradle: 7.6-20221017231502+0000

@ljacomet
Copy link
Member

Thank you for your interest in Gradle!

This issue lacks information and/or a reproducer to track down the problem. Unless you provide that information over the next 7 days, this issue will be closed.

You can use the following as a base for your reproducer: https://github.com/gradle/gradle-issue-reproducer


The error looks like an incomplete setup, but it is hard to say what is missing exactly without a reproducer.

@Prototik
Copy link
Contributor

Prototik commented Oct 21, 2022

I can reproduce this with this minimal sample:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
        classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.18.4")
    }
}

Reproducer: https://github.com/Prototik/gradle-bug-22440

Removing atomicfu plugin or changing kotlin plugin to 1.7.10 fixes the build.

Actually atomicfu maintainers aware of the issue: Kotlin/kotlinx-atomicfu#248.
But still message not clear and intuitive anyway.

@obecker
Copy link

obecker commented Dec 3, 2022

See #22510

@ov7a ov7a removed the to-triage label Oct 19, 2023
@ov7a
Copy link
Member

ov7a commented Oct 19, 2023

Sorry for the late reply.

Given the discussion in

We believe this issue is no longer relevant. Please file a new issue if necessary.

@ov7a ov7a closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2023
@ov7a ov7a added closed:invalid Not applicable to Gradle or EOL version and removed a:bug in:dependency-resolution engine metadata labels Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:invalid Not applicable to Gradle or EOL version
Projects
None yet
Development

No branches or pull requests

6 participants