This message was deleted.
# dependency-management
s
This message was deleted.
j
If it is only the pom.xml metadata that you want to modify, you can use the pom { withXml { … } } block to modify that directly after it has been generated. There you can replace the
+
with something else. In this comment, there is an example for how to find the dependencies section and modify it: https://github.com/gradle/gradle/issues/3170#issuecomment-544248344
🙌 1
Have you considered using open ranges (e.g.
[1.1,)
instead of
1.1.+
) which Maven also understands?
r
Are those syntaxes equivalent? I'm wondering why Gradle itself doesn't perform the conversion
Additionally, I noticed that the
withXml { ... }
block only runs after any POM metadata warnings have been emitted
j
I am not exactly sure with the differences between the notations. I think
[1.1, 1.2[
would be equivalent to
1.1.+
But maybe I miss some detail. I think these are slightly different approaches for how to look at versions. So they might not always (globally) be equivalent, but for most use cases they are. https://docs.gradle.org/current/userguide/single_versions.html https://docs.gradle.org/current/userguide/rich_versions.html
POM metadata warnings have been emitted
Yes. You would need to turn off the corresponding warning. https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html#disabling_metadata_compatibility_publication_warnings
I think I would: • If I really care about Maven (i.e. know that what I publish will be used with Maven), then I would switch to Maven-style ranges and not use
+
at all • If I am just annoyed by the warning: Silence the warning and ignore what ends up in the POMs (they are not used).
r
Since Maven compatibility is largely theoretical for me at this point, I went with the second option. Thanks for all your advice!