Closed twadzins closed 3 years ago
I'll merge this when I'm able to properly release it, as I'm unsure of the issues that could arrive out of using an addon in the current version with this missing, however thank you for this as it's been quite an annoyance in other projects aswell 😅
Exclude kotlin metadata files that break the ability to use Kotlin for Addon-Workspace addons.
Description
After raising this issue on discord, it was suggested I make a PR: https://discord.com/channels/411619823445999637/576841425103093761/742629286149750854
Here's what I said in discord: I am successfully using the nice Hyperium Addon workspace to create the sample add-on. I’d like to code in Kotlin (I’m teaching my son to learn Kotlin), so I updated the build.gradle to support kotlin. I then created any IAddon successfully and it compiles, but it seems there’s a bug in IntelliJ related to Kotlin and fat jars that makes it so the IDE shows any import from the Hyperium jar as invalid, and code completion and navigation to classes fails on anything from that jar.
I tried a pretty straightforward workaround found in the kotlin bug ticket ( basically, add a few excludes for some Kotlin metadata files in the HyperiumClient build.gradle) and that seems to work to make the Kotlin Addon show properly in IntelliJ. Here’s the link to the workaround and underlying issue: https://youtrack.jetbrains.com/issue/KT-25709#focus=Comments-27-3752033.0-0
## Context ## Anything ElseChecklist