Incorrect exceeded version reported in HTML report, while correct version is reported in console output
jayasuryat opened this issue · 6 comments
Hi @ben-manes,
Thanks for this awesome plugin.
I recently encountered this issue, where while reporting exceeded versions, the plugin correctly reports the Latest version
in the console output
, but in the HTML
report the Current version
is being reported as the Latest version
.
I did some quick digging in the source code, and found this :
Looks like the same value dependency.version
is being printed for both Current version
& Latest version
(instead of dependency.latest
(I'm assuming)).
While I assumed that this issue is valid and the thing I found is the cause, I could be wrong. I got a bit curious and did some quick digging.
It might have been a mistake from the Groovy rewrite to Kotlin. You might look at the original Groovy code to confirm. PRs are always welcome
Looks like this also existed in the groovy
version:
While the PlainTextReporter
seems to be correct in the both versions
PlainTextReporter
- Kotlin
PlainTextReporter
- Groovy
Thanks for the quick response @ben-manes, I'd love to contribute the fix for this. Let me know if my understanding of the existence of the issue sounds right to you.
Yep, it looks like it was maybe changed in #508 where that method used to use the "available version" but had a refactoring mistake. In the original contribution it called item.getLatest()
.
@ben-manes I've created a PR with the change, the said change only changes the dependency.version
to dependency.latest
.
I didn't find any tests that needed to be updated, altho some tests are failing only in the DifferentGradleVersionsSpec
class, (rest all test classes are passing fine). From what I could understand these were due to Java version mismatch.
Let me know if there is anything else needed to be updated.
Glad to know that everything is working as expected.
This was super quick, thanks @ben-manes.