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

Gradle kotlinx-coroutines-bom error with armeria 0.98.x #2487

Closed
DasAmpharos opened this issue Feb 13, 2020 · 3 comments
Closed

Gradle kotlinx-coroutines-bom error with armeria 0.98.x #2487

DasAmpharos opened this issue Feb 13, 2020 · 3 comments
Labels

Comments

@DasAmpharos
Copy link

I'm attempting to use armeria 0.98.x with gradle and am receiving the following error:

Could not resolve all files for configuration ':{PROJECT_NAME}:detachedConfiguration40'.
> Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.3.
  Required by:
      project :{PROJECT_NAME}
   > Cannot choose between the following variants of org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.3:
       - enforcedRuntimeElements
       - runtimeElements
     All of them match the consumer attributes:
       - Variant 'enforcedRuntimeElements' capability org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.3:
           - Unmatched attributes:
               - Found org.gradle.category 'enforced-platform' but wasn't required.
               - Found org.gradle.status 'release' but wasn't required.
               - Found org.gradle.usage 'java-runtime' but wasn't required.
       - Variant 'runtimeElements' capability org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.3:
           - Unmatched attributes:
               - Found org.gradle.category 'platform' but wasn't required.
               - Found org.gradle.status 'release' but wasn't required.
               - Found org.gradle.usage 'java-runtime' but wasn't required.

This is what my gradle file looks like:

apply plugin: "org.springframework.boot"
apply plugin: "io.spring.dependency-management"

dependencyManagement {
    imports {
        mavenBom "com.linecorp.armeria:armeria-bom:0.98.1"
        mavenBom "io.netty:netty-bom:4.1.45.Final"
    }
}

dependencies {
    api("com.linecorp.armeria:armeria-grpc")
    api("com.linecorp.armeria:armeria-spring-boot-webflux-starter")
    runtime("com.linecorp.armeria:armeria-spring-boot-actuator-starter")
}

tasks.withType(JavaCompile) {
    sourceCompatibility = "1.8"
    targetCompatibility = "1.8"
    options.compilerArgs += "-parameters"
    options.encoding = "UTF-8"
    options.debug = true
}

When I downgrade to 0.97.0, the issue goes away.

@anuraaga
Copy link
Collaborator

This is probably because upgrading our spring-boot dependency version also bumped a dependency on kotlin-coroutines which doesn't work correctly with older spring-dependencies plugin.

spring-gradle-plugins/dependency-management-plugin#263 (comment)

No clue why spring boot would even have a dependency on Kotlin...

But the issue seems to be fixed in the latest version of the dependencies plugin, 1.0.9.RELEASE. Can you try updating it?

@KarboniteKream
Copy link
Contributor

I had the same issue. Updating the dependencies plugin to 1.0.9.RELEASE fixed the issue.

@ikhoon
Copy link
Contributor

ikhoon commented Feb 19, 2020

@KarboniteKream Thanks for sharing! :-)

@trustin trustin closed this as completed Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants