Hi folks :wave: , Somewhere between Gradle 8.1.1 ...
# dependency-management
y
Hi folks 👋 , Somewhere between Gradle 8.1.1 -> 8.2.x, our mima (JVM binary compat check) plugin broke because gradle will resolve the old published jar for a project to the project itself instead of the published jar. The effect is that the comparison will happen between the latest classes in build/ and itself, which will always pass. For example, say project A (for publish it uses
foo:bar
, and has published version
foo:bar:1.0.0
) . The issue is that if I run
gr A:mima
now, the mima plugin will pass a configuration to resolve with
foo:bar:1.0.0
but Gradle will now resolve
foo:bar:1.0.0 -> project :A
Wonder if there is any advice on how to approach this to force resolution back to external module instead of internal project? Thank you!
v
Are you sure this changed due to Gradle version and you didn't change anything else? Afair it should always be by normal version rules, higher version wins, except if you configure Gradle to always prefer the project independent of the version
y
> Are you sure this changed due to Gradle version and you didn't change anything else? Yes fairly sure. Verified by only changing
gradle/wrapper/gradle-wrapper.properties
to toggle versions, and the breakages is between 8.1.1 -> 8.2.x The suspected breakage could be around "who wins", e.g. how does
1.0.0
compare to HEAD (which doesn't necessarily have a version number attached to it)
v
It has to have a version, and be it the default
unspecified
y
Thanks for the pointers, Björn! I might've found the culprit here: there was quite some hack / heavy dependent on implementation behavior - https://github.com/borissmidt/gradle-mima-plugin/blob/master/src/main/scala/the/flowering/branches/mima/PreviousVersionResolutionHelpers.java#L[…]72 and this trick no longer works after 8.2. sigh..
v
Well, yeah, that some thread-local group manipulation hack could break in any minor version does not sound too far-fetched 😄
It also is dead, unmaintained, archived, and even says it is only compatible with Gradle up to 6.3, so ... 🙂
🙃 1