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

Make guava dependency configurable (or non strict?) #485

Closed
jschneider opened this issue Jan 5, 2022 · 19 comments · Fixed by #501
Closed

Make guava dependency configurable (or non strict?) #485

jschneider opened this issue Jan 5, 2022 · 19 comments · Fixed by #501

Comments

@jschneider
Copy link

I am using the jib plugin which has a dependency declared to guava

'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.guava:guava:30.1.1-jre'

This clashes with the strict configuration of refreshVersions.
Is there any way to make this configurable? Or override it somehow?

@LouisCAD
Copy link
Member

LouisCAD commented Jan 9, 2022

Does the latest version (0.30.1) of refreshVersions still clashes with your project?

@daviddenton
Copy link

We're getting this as well - 0.30.1 doesn't work either (as well as 0.30.2). Which is going to be a real problem with us upgrading.. 😄

Is RV actually reliant on something that was removed in Guava 31? Maybe we can help to find a workaround?

@LouisCAD
Copy link
Member

LouisCAD commented Jan 10, 2022

Guava is a transitive dependency of a dependency of refreshVersions: Google Cloud Storage.

Which version of Guava do you need in your buildscript classpath?

@daviddenton
Copy link

It'a actually a transitive dependency of the Google JIB gradle plugin... 😂

@LouisCAD
Copy link
Member

Mistyped, updated my message above (added emphasis on corrected word)

@daviddenton
Copy link

We don't have an actual dependency - it's from JIB. Here's the output of gradle:

😄

> Could not resolve com.google.guava:guava:30.1.1-jre.
  Required by:
      unspecified:unspecified:unspecified > com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4 > gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4
   > Cannot find a version of 'com.google.guava:guava' that satisfies the version constraints:
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.guava:guava:30.1.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.guava:guava:{strictly 30.1.1-jre}'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:libraries-bom:24.0.0' (platform-runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.http-client:google-http-client:1.40.1' (runtime) --> 'com.google.guava:guava:30.1.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.auth:google-auth-library-oauth2-http:1.2.1' (runtime) --> 'com.google.guava:guava:31.0.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'io.opencensus:opencensus-contrib-http-util:0.28.0' (runtime) --> 'com.google.guava:guava:29.0-android'

> Could not resolve com.google.guava:guava:{strictly 30.1.1-jre}.
  Required by:
      unspecified:unspecified:unspecified > de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0 > de.fayard.refreshVersions:refreshVersions:0.30.0 > de.fayard.refreshVersions:refreshVersions-core:0.30.0
   > Cannot find a version of 'com.google.guava:guava' that satisfies the version constraints:
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.guava:guava:30.1.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.guava:guava:{strictly 30.1.1-jre}'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:libraries-bom:24.0.0' (platform-runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.http-client:google-http-client:1.40.1' (runtime) --> 'com.google.guava:guava:30.1.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.auth:google-auth-library-oauth2-http:1.2.1' (runtime) --> 'com.google.guava:guava:31.0.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'io.opencensus:opencensus-contrib-http-util:0.28.0' (runtime) --> 'com.google.guava:guava:29.0-android'

> Could not resolve com.google.guava:guava:31.0.1-jre.
  Required by:
      unspecified:unspecified:unspecified > de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0 > de.fayard.refreshVersions:refreshVersions:0.30.0 > de.fayard.refreshVersions:refreshVersions-core:0.30.0 > com.google.cloud:libraries-bom:24.0.0
      unspecified:unspecified:unspecified > de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0 > de.fayard.refreshVersions:refreshVersions:0.30.0 > de.fayard.refreshVersions:refreshVersions-core:0.30.0 > com.google.cloud:google-cloud-storage:2.1.9
   > Cannot find a version of 'com.google.guava:guava' that satisfies the version constraints:
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.guava:guava:30.1.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.guava:guava:{strictly 30.1.1-jre}'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:libraries-bom:24.0.0' (platform-runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.http-client:google-http-client:1.40.1' (runtime) --> 'com.google.guava:guava:30.1.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.auth:google-auth-library-oauth2-http:1.2.1' (runtime) --> 'com.google.guava:guava:31.0.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'io.opencensus:opencensus-contrib-http-util:0.28.0' (runtime) --> 'com.google.guava:guava:29.0-android'

> Could not resolve com.google.guava:guava:30.1.1-android.
  Required by:
      unspecified:unspecified:unspecified > com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4 > gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4 > com.google.http-client:google-http-client:1.40.1
   > Cannot find a version of 'com.google.guava:guava' that satisfies the version constraints:
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.guava:guava:30.1.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.guava:guava:{strictly 30.1.1-jre}'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:libraries-bom:24.0.0' (platform-runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.http-client:google-http-client:1.40.1' (runtime) --> 'com.google.guava:guava:30.1.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.auth:google-auth-library-oauth2-http:1.2.1' (runtime) --> 'com.google.guava:guava:31.0.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'io.opencensus:opencensus-contrib-http-util:0.28.0' (runtime) --> 'com.google.guava:guava:29.0-android'

> Could not resolve com.google.guava:guava:31.0.1-android.
  Required by:
      unspecified:unspecified:unspecified > com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4 > gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4 > com.google.auth:google-auth-library-oauth2-http:1.2.1
   > Cannot find a version of 'com.google.guava:guava' that satisfies the version constraints:
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.guava:guava:30.1.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.guava:guava:{strictly 30.1.1-jre}'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:libraries-bom:24.0.0' (platform-runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.http-client:google-http-client:1.40.1' (runtime) --> 'com.google.guava:guava:30.1.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.auth:google-auth-library-oauth2-http:1.2.1' (runtime) --> 'com.google.guava:guava:31.0.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'io.opencensus:opencensus-contrib-http-util:0.28.0' (runtime) --> 'com.google.guava:guava:29.0-android'

> Could not resolve com.google.guava:guava:29.0-android.
  Required by:
      unspecified:unspecified:unspecified > com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4 > gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4 > com.google.http-client:google-http-client:1.40.1 > io.opencensus:opencensus-contrib-http-util:0.28.0
   > Cannot find a version of 'com.google.guava:guava' that satisfies the version constraints:
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.guava:guava:30.1.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.guava:guava:{strictly 30.1.1-jre}'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:libraries-bom:24.0.0' (platform-runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Constraint path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'com.google.guava:guava:31.0.1-jre'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.http-client:google-http-client:1.40.1' (runtime) --> 'com.google.guava:guava:30.1.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.1.4' (runtime) --> 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.1.4' (runtime) --> 'com.google.auth:google-auth-library-oauth2-http:1.2.1' (runtime) --> 'com.google.guava:guava:31.0.1-android'
        Dependency path 'unspecified:unspecified:unspecified' --> 'de.fayard.refreshVersions:de.fayard.refreshVersions.gradle.plugin:0.30.0' (runtime) --> 'de.fayard.refreshVersions:refreshVersions:0.30.0' (runtimeElements) --> 'de.fayard.refreshVersions:refreshVersions-core:0.30.0' (runtimeElements) --> 'com.google.cloud:google-cloud-storage:2.1.9' (runtime) --> 'io.opencensus:opencensus-contrib-http-util:0.28.0' (runtime) --> 'com.google.guava:guava:29.0-android'

@jschneider jschneider changed the title Make guava dependency configurable (or non strict? Make guava dependency configurable (or non strict?) Jan 11, 2022
@jschneider
Copy link
Author

jschneider commented Jan 20, 2022

I updated jib plugin to 3.2.0. It does not work either.

@LouisCAD
Copy link
Member

You'd need to set the dependency it in the buildscript of the settings.gradle[.kts] file for it to be able to take precedence over what refreshVersions is requesting, and that'd work only if it's declared before the plugins block where refreshVersions is declared I believe.

@jschneider
Copy link
Author

I think I have figured out the problem: I added the jib plugin in the settings.gradle.kts - as workaround for the same issue with an old version!
It seems to work now! I am in the process of cleaning up.

@daviddenton Check if you have the same workaround in your settings.gradle.kts

@jschneider
Copy link
Author

Uuh, I am sorry! This issue is not solved. I didn't apply the Jib plugin in the parent. And run into a ClassNotFoundError.
After enabeling Jib again, the same error occurs.

@jschneider jschneider reopened this Jan 25, 2022
@daviddenton
Copy link

daviddenton commented Jan 25, 2022

@jschneider can you confirm that it is the same error? I haven't got it to hand right now, but I remember it was a mismatch on a class from Apache HTTP client when I tried to upgrade earlier (v0.40)

@LouisCAD
Copy link
Member

Using GradleUp/gr8 to shadow these dependencies, as well as removing unused code from libraries is an option I'm considering.

I know it'll require some setup to keep refreshVersions working though, so if you want to speed this up, feel free to explore adding it and sending even a draft PR where I can start from.

@jschneider
Copy link
Author

@daviddenton The Apche HTTP client error has also happend to me.
But the issue I am referencing is this:
#361

But as I figured now: Removing the workaround does not fix the problem. I will try to create a minimal sample project that reproduces the problem.

But defining a dependency as "strictly" seems to quite dangerous in the long run.
Even if we find a way to work around this issue this time.

@LouisCAD
Copy link
Member

That's the problem with settings plugins, all dependencies are set in stone because they are evaluated before buildSrc and build.gradle[.kts] are even compiled. The "strictly" you mention is not a choice, it's implicit and we cannot control that directly.

@daviddenton
Copy link

Shading the dependencies is probably the way to go TBH.

@LouisCAD
Copy link
Member

Hello, after exploring shading the dependencies, I was unhappy with the size that grew from less than a megabyte, to more than 17MB. It's nothing compared to how big is Gradle, but still, when you factor in the fact that Gradle has its own Google Cloud Storage client, it doesn't look good to add another one with all the gigantic transitive dependencies.

Anyway, I experimented with reusing Gradle's own GcsClient, and after several unexpected twists, like two classes with the same fully qualified name, that are incompatible, forcing me to use ugly hacks, I got a prototype working on my machine (and it's now 5:30AM 😅😅).

I'll polish it, and I'll replace the current implementation with that new one, which will let me drop the Google dependencies, including the guava version constraint.

You can expect an update within the next 8 days (can't promise earlier, I have work and sleep to catch up on).

LouisCAD added a commit that referenced this issue Feb 5, 2022
…sClient

That allows us to drop the dependency on the Google Cloud Storage library that in
turn depends on Guava, which was causing dependency hell issues in host projects.

Resolves #485
@LouisCAD
Copy link
Member

LouisCAD commented Feb 6, 2022

Resolution just released in 0.40.1!

@jschneider
Copy link
Author

Works like a charm! Thanks!

@LouisCAD
Copy link
Member

LouisCAD commented Feb 9, 2022

Thanks for pushing this issue through!

I'm happy that it's now the past and that refreshVersions also got smaller by dropping that avoidable dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants