:loudspeaker: For anyone else writing a custom sc...
# scripting
m
📢 For anyone else writing a custom scripting host you might want to check out this suggestion I filed in YouTrack to swap out the default Maven Resolver bridge with some custom code that uses JBoss ShrinkWrap. It's quite easy, just requires adding two files to your codebase. This resolves a bunch of bugs that can cause weird failures in the IDE or at runtime e.g. the AWS SDK isn't usable via
@file:DependsOn
unless you do this because correct resolution of those artifacts requires Maven model building. There are likely other edge cases too. Please note that I didn't bother implementing any support for options as I don't use them. But it should be easy enough to see how to do it. Hope that helps!
👀 1
p
I recall some issues related to the Maven Resolver, so I'm glad someone noticed it too + offered an alternative! But I'm wondering how JBoss ShrinkWrap relates to a dependency resolver used with Gradle, do you know? Especially in terms of resolving conflicts, like: choosing the nearest node in the tree vs. choosing the newest version
m
Well, the underlying library can be configured to use Gradle style version conflict resolution IIRC but I don't see any API exposed in ShrinkWrap to do that. It seems to be maintained so I guess they'd accept a patch to add it. What's missing is use of Gradle's module metadata for Kotlin Multiplatform stuff.
c
Hey, I think I am having this same issue. I'm interested in your fix however the files return a 404 on YouTrack.