-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Google Cloud components should not depend on -android
versions
#4440
Comments
Additionally, the docs specify that Google Cloud components aren't even compatible with Android:
(https://cloud.google.com/logging/docs/setup/java) |
Would it make sense for us to exclude grpc's dependency on |
Oh... I see. @andreamlin commented:
Our libraries need to support JDK 7, but the |
The android version can be used for two things: 1) android support, 2) JDK 7 support. google-cloud-java supports JDK 7, so the -android version is required. Note that Maven's output looks like what I'd expect. There's no bug here. It is complaining that the version was downgraded from 26.0-jre to 26.0-android (because 'j' in jre is greater than 'a' in android). So this is the same sort of error you get with 25.0 vs 26.0. You need to add the higher version of Guava to your dependencies, or reorder your dependencies. |
Wait a minute. That output does look strange. Why is Maven complaining? "Expected version is 26.0-jre" and "Resolved version is 26.0-jre"... so what's the issue? @stevenschlansker, oh, you're using dependencyConvergence? Dependency Convergence adds pain for no benefit. I strongly recommend requireUpperBoundDeps instead. In any case when using dependencyConvergence these sorts of errors will crop up and you have to manually address it (via exclusions which is part of why dependencyConvergence should not be used). |
I understand that it can be resolved in each project by explicitly resolving the conflict -- however pushing this onto every downstream user is not great. It's not quite the same as I guess ideally Guava would be split into I can play around with Per https://maven.apache.org/ref/3.3.3/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html it should be alphabetically sorted, but relying on this behavior over making the versioning more sane seems like a really unfortunate decision - inherently one is "greater" than the other, but which one you want is context dependent. If |
Complaints about Guava's versioning system should be filed at https://github.com/google/guava and not here. It's already been made clear that
|
I don't think that we can do much on this repo. I'm going to close this issue since there isn't anything actionable for this repo. @ejona86 suggested alternative repos in which this investigation can proceed. |
Currently, the
google-cloud-logging-logback
component depends on Guava version26.0-andriod
. This is not appropriate for Google Cloud projects which are running on a full JDK in e.g. GKE. The two different versions are not considered compatible by Maven and version checker plugins.It looks like this issue was introduced in #3980
Environment details
0.79.0-alpha
Steps to reproduce
google-cloud-logging-logback
Stacktrace
The text was updated successfully, but these errors were encountered: