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

Support for Guava 32? #6

Closed
steve-hickman-epistimis opened this issue Nov 10, 2023 · 1 comment
Closed

Support for Guava 32? #6

steve-hickman-epistimis opened this issue Nov 10, 2023 · 1 comment

Comments

@steve-hickman-epistimis

Guava is now on v. 32.1. I got the following error:

  > Could not resolve com.google.guava:guava:32.1.2-jre.
     Required by:
         project :
      > The consumer was configured to find attribute 'org.gradle.dependency.bundling' with value 'external'. However we cannot choose between the following variants of com.google.guava:guava:32.1.2-jre:
          - androidRuntimeElements
          - jreRuntimeElements
        All of them match the consumer attributes:
          - Variant 'androidRuntimeElements' capabilities com.google.collections:google-collections:32.1.2-jre and com.google.guava:guava:32.1.2-jre declares attribute 'org.gradle.dependency.bundling' with value 'external':
              - Unmatched attributes:
                  - Provides org.gradle.category 'library' but the consumer didn't ask for it
                  - Provides org.gradle.jvm.environment 'android' but the consumer didn't ask for it
                  - Provides org.gradle.jvm.version '8' but the consumer didn't ask for it
                  - Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
                  - Provides org.gradle.status 'release' but the consumer didn't ask for it
                  - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
          - Variant 'jreRuntimeElements' capabilities com.google.collections:google-collections:32.1.2-jre and com.google.guava:guava:32.1.2-jre declares attribute 'org.gradle.dependency.bundling' with value 'external':
              - Unmatched attributes:
                  - Provides org.gradle.category 'library' but the consumer didn't ask for it
                  - Provides org.gradle.jvm.environment 'standard-jvm' but the consumer didn't ask for it
                  - Provides org.gradle.jvm.version '8' but the consumer didn't ask for it
                  - Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
                  - Provides org.gradle.status 'release' but the consumer didn't ask for it
                  - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it

Will there be an update to this to support the latest version of Guava? Alternatively, is there a general set of rules that will tell others how to update this as Guava is updated?

@jjohannes
Copy link
Owner

See the README:

⚠️ The functionality of this plugin has been integrated into 'org.gradlex.java-ecosystem-capabilities'
Preferably use the org.gradlex.java-ecosystem-capabilities plugin in your build.

The latest version of org.gradlex.java-ecosystem-capabilities should work with latest Guava and no more updates should be needed for new Guava versions.

However, Guava now offers these alternative variants (even without the plugin). Your error looks a bit like you might need to define the org.gradle.jvm.environment attribute. Unfortunately, you did not post the whole error (which configuration is Gradle trying to resolve there?). This is a change in Guava itself and in way now unrelated to these plugins.
See: google/guava#6612 (comment) and other discussion there.

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