Lucky Block

Lucky Block

1M Downloads

Fabric mod incompatibility risk

teddyxlandlee opened this issue ยท 2 comments

commented

I noticed that the Fabric version's JAR of this mod simply extracts Kotlin Runtime Environment into the jar itself. It can make other Kotlin mod incompatible with Lucky Block Mod.
Consider using fabric-language-kotlin as a dependency. You can use include(...) in build.gradle to include FLK and Kotlin RE.
I've sent a PR in #26. Good Luck!

commented

Sorry to reply you too late.
As I unzip luckyblock-1.17.0-1-fabric.jar I saw this very happily, which is one of the BEST solution that I have NEVER thought.
-- though not using fabric-language-kotlin, it presents the best compatibility & the smallest file size (only 1891KB in total).
Screenshot

commented

Thanks, you're absolutely right, there's a risk of incompatibility if I bundle kotlin-stdlib at the top level of the jar. I've solved this by relocating kotlin-stdlib to the mod.lucky namespace using the Shadow plugin, you can see here if interested: #28

I prefer this over fabric-language-kotlin, since it's a more standard solution that will also work with Forge (once I migrate that over to the new kotlin codebase), plus it comes with a nice minimization feature which brings the jar down to 1.8M