Use DependencyResolver instead of IvySbt#Module directly #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So this PR is the result of me going down a giant rabbit hole. The original improvement I was trying to do is replacing the usage of
IvySbt#Module
because I was experiencing sbt/sbt#3618 and the workaround at sbt/sbt#3618 (comment) for some reason didn't work (I guesssys.props
was not being passed to sbt plugins due to classloader isolation???).So after wasting a stupid amount of time figuring out if I could somehow pass the
packaging.type
manually into Ivy, I just figured why not just entirely replaceIvySbt#Module
with sbt'supdate
task, that way we can also benefit from Coursier's faster dependency resolution (little tidbit, but sbt-license-report can end up taking ages in some cases due to Ivy)? Then this is where the rabbit hole began, I ended up hitting coursier/coursier#1790 (tl;dr version, Coursier doesn't properly grab the license information when usingIvySbt#Module
as a module).IvySbt#Module
also needs to be used because certain dependencies don't hold the license info inpom.xml
(see https://discord.com/channels/632150470000902164/922600050989875282/1151492070373085306).So rather than using
update
I instead opted forIvyDependencyResolver
. While it doesn't go the full way of just usingupdate
to get all of the dependencies and their respective licenses, the data structures returned by bothDependencyResolution.update
and sbt'supdate
task are the same (i.e.UpdateReport
) so once that coursier issue is solved a future PR to useupdate
will be trivial.The PR also drops support for SBT 0.13.x because its ancient and
DependencyResolution
doesn't exist there.