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

4.33.16 breaks because of multiple variants of com.google.guava:guava:32.1.3-jre #792

Closed
xehpuk opened this issue May 29, 2024 · 9 comments · Fixed by #793
Closed

4.33.16 breaks because of multiple variants of com.google.guava:guava:32.1.3-jre #792

xehpuk opened this issue May 29, 2024 · 9 comments · Fixed by #793
Labels
gradle bug Create a report to help us improve

Comments

@xehpuk
Copy link

xehpuk commented May 29, 2024

Describe the bug

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve com.google.guava:guava:32.1.3-jre.
     Required by:
         project : > org.jfrog.buildinfo:build-info-extractor-gradle:4.33.16
         project : > org.jfrog.buildinfo:build-info-extractor-gradle:4.33.16 > org.jfrog.buildinfo:build-info-extractor:2.41.17
         project : > org.jfrog.buildinfo:build-info-extractor-gradle:4.33.16 > org.jfrog.buildinfo:build-info-client:2.41.17
         project : > org.jfrog.buildinfo:build-info-extractor-gradle:4.33.16 > org.jfrog.buildinfo:build-info-api:2.41.17
      > The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally. However we cannot choose between the following variants of com.google.guava:guava:32.1.3-jre:
          - androidRuntimeElements
          - jreRuntimeElements
        All of them match the consumer attributes:
          - Variant 'androidRuntimeElements' capabilities com.google.collections:google-collections:32.1.3-jre and com.google.guava:guava:32.1.3-jre declares a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally:
              - Unmatched attributes:
                  - Provides attribute 'org.gradle.jvm.environment' with value 'android' but the consumer didn't ask for it
                  - Provides release status but the consumer didn't ask for it
          - Variant 'jreRuntimeElements' capabilities com.google.collections:google-collections:32.1.3-jre and com.google.guava:guava:32.1.3-jre declares a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally:
              - Unmatched attributes:
                  - Provides attribute 'org.gradle.jvm.environment' with value 'standard-jvm' but the consumer didn't ask for it
                  - Provides release status but the consumer didn't ask for it
        The following variants were also considered but didn't match the requested attributes:
          - Variant 'androidApiElements' capabilities com.google.collections:google-collections:32.1.3-jre and com.google.guava:guava:32.1.3-jre declares a library compatible with Java 8, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component
          - Variant 'jreApiElements' capabilities com.google.collections:google-collections:32.1.3-jre and com.google.guava:guava:32.1.3-jre declares a library compatible with Java 8, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component

To Reproduce
Use org.jfrog.buildinfo:build-info-extractor-gradle:4.33.16 and build.

Expected behavior
Successful build.

Versions

  • Gradle Artifactory plugin version: 4.33.16
  • Operating system: any
  • Artifactory Version: any

Additional context
Works with 4.33.15.

@xehpuk xehpuk added the gradle bug Create a report to help us improve label May 29, 2024
@yahavi
Copy link
Member

yahavi commented May 30, 2024

@xehpuk
Appreciate you bringing this matter to our attention. We attempted to replicate it on an Android project without success. Would you be open to generating a minimal reproducible case for this issue?

Thanks.

@xehpuk
Copy link
Author

xehpuk commented May 30, 2024

It's not an Android project, if that helps.

Sadly, it may take time for me to construct a minimal case.

@ViToni
Copy link

ViToni commented Jun 3, 2024

Encountered the same issue. Also a non-Android project.

@ViToni
Copy link

ViToni commented Jun 3, 2024

Seems to be related to #789 and by that to google/guava#6801.

@ViToni
Copy link

ViToni commented Jun 6, 2024

@xehpuk Which version of Gradle do you use? We had the issue when using Gradle 6.9 but the issue seems to have gone away by switching to Gradle 7.6.2.

@xehpuk
Copy link
Author

xehpuk commented Jun 7, 2024

@ViToni Gradle 6.8.1 and Java 8. 🫣

@ViToni
Copy link

ViToni commented Jun 7, 2024

@xehpuk Maybe give Gradle 7.6.2 a try. Depending on the plugins you use this is a no-brainer. We are using Java 8 as well and our only issue was an external Gradle Saxon task which didn't define inputs/outputs properly and made Gradle nag about it...
Gradle 8.x might be a different beast.

@yahavi yahavi mentioned this issue Jun 8, 2024
1 task
@yahavi
Copy link
Member

yahavi commented Jun 9, 2024

@xehpuk @ViToni
Based on your inputs, we have removed Guava from the code.
Version 4.33.17 has been released and includes the fix for this issue.
Please feel free to use it and share your feedback.

@xehpuk
Copy link
Author

xehpuk commented Jun 10, 2024

@ViToni The project is in ultra-maintenance mode. Only touching it if I have to. 😅
@yahavi That seems to fix it for me, thanks! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gradle bug Create a report to help us improve
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants