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

Guava 32.1 - capability already exists #54

Closed
kmoens opened this issue Jun 30, 2023 · 4 comments · Fixed by #56
Closed

Guava 32.1 - capability already exists #54

kmoens opened this issue Jun 30, 2023 · 4 comments · Fixed by #56
Labels
a:rule One or more metadata rules that should be added or updated

Comments

@kmoens
Copy link
Contributor

kmoens commented Jun 30, 2023

When we use Guava 32.0, we now get an error that the capability already exists, because Guava now also publishes Gradle metadata, and the capability is part of that one already I believe.

Simple reproduction:

plugins {
    id 'java'
    id 'java-library'
    id 'org.gradlex.java-ecosystem-capabilities' version '1.3'
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.assertj:assertj-guava:1.3.1'
}

Gives:

 ./gradlew dependencyInsight --configuration compileClasspath --dependency guava

> Task :dependencyInsight
com.google.guava:guava:[15.0,) FAILED
   Failures:
      - Could not resolve com.google.guava:guava:[15.0,).
          - Could not resolve com.google.guava:guava:32.1.0-jre.
              - There was an error while evaluating a component metadata rule for com.google.guava:guava:32.1.0-jre.
                  - Cannot add capability com.google.collections:google-collections with version 32.1.0 because it's already defined with version 32.1.0-jre

com.google.guava:guava:[15.0,) FAILED
\--- org.assertj:assertj-guava:1.3.1
     \--- compileClasspath

org.assertj:assertj-guava:1.3.1
  Variant compile:
    | Attribute Name                 | Provided | Requested    |
    |--------------------------------|----------|--------------|
    | org.gradle.status              | release  |              |
    | org.gradle.category            | library  | library      |
    | org.gradle.libraryelements     | jar      | classes      |
    | org.gradle.usage               | java-api | java-api     |
    | org.gradle.dependency.bundling |          | external     |
    | org.gradle.jvm.environment     |          | standard-jvm |
    | org.gradle.jvm.version         |          | 8            |

org.assertj:assertj-guava:1.3.1
\--- compileClasspath

A web-based, searchable dependency report is available by adding the --scan option.
@kmoens kmoens changed the title Guava 32.0 - capability already exists Guava 32.1 - capability already exists Jun 30, 2023
@jjohannes
Copy link
Member

Thanks for letting me know. I am aware of the issue already but I did not know that a 32.1 was published.

Took me a bit by surprise that suddenly Gradle Metadata is published. After waiting for it for almost 4 years. :)

I will do a patch for this plugin later today.

@jjohannes
Copy link
Member

Unfortunately, there is also an issue with the published metadata. I'll wait until that is resolved before doing the update here.

google/guava#6612

@cpovirk
Copy link

cpovirk commented Jun 30, 2023

Sorry for both the extremely slow publishing of the metadata and the error in the release. Thanks to you both for reporting it.

@jjohannes
Copy link
Member

Fixed in 1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:rule One or more metadata rules that should be added or updated
Projects
None yet
3 participants