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
Comments
Does the latest version (0.30.1) of refreshVersions still clashes with your project? |
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? |
Guava is a transitive dependency of a dependency of refreshVersions: Google Cloud Storage. Which version of Guava do you need in your buildscript classpath? |
It'a actually a transitive dependency of the Google JIB gradle plugin... 😂 |
Mistyped, updated my message above (added emphasis on corrected word) |
We don't have an actual dependency - it's from JIB. Here's the output of gradle: 😄
|
I updated jib plugin to 3.2.0. It does not work either. |
You'd need to set the dependency it in the |
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! @daviddenton Check if you have the same workaround in your settings.gradle.kts |
Uuh, I am sorry! This issue is not solved. I didn't apply the Jib plugin in the parent. And run into a ClassNotFoundError. |
@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) |
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. |
@daviddenton The Apche HTTP client error has also happend to me. 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. |
That's the problem with settings plugins, all dependencies are set in stone because they are evaluated before |
Shading the dependencies is probably the way to go TBH. |
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). |
…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
Resolution just released in 0.40.1! |
Works like a charm! Thanks! |
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. |
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?
The text was updated successfully, but these errors were encountered: