Open WarningImHack3r opened 3 months ago
As far as I understand, you're writing a plugin for IntelliJ. It indeed has some bundled version of serialization, which may not be up-to-date. I suggest you create a ticket in the Intellij platform subsystem (https://youtrack.jetbrains.com/issues/IJPL); maybe they have a solution, as I am not directly involved in it. What you can do now, perhaps, is to use the Shadow plugin to re-package a required library version into your plugin with a different package.
Yep you got it correctly! Sorry for being unclear.
What's the Shadow plugin? Do you think I can try to use the Gradle constraints
API to override the bundled dep?
But yeah, I'll create a ticket, thanks!
Edit: opened!
@sandwwraith ok that looks a bit like what I meant to do with Gradle; I'm going to try that filtering thing while the ticket's being processed! Thanks
@sandwwraith I can't manage to make it work:
// build.gradle.kts
...
tasks {
shadowJar {
relocate("kotlinx.serialization.json", "a") {
exclude("kotlinx.serialization.json.*")
}
}
...
This does absolutely nothing
Describe the bug
Based on https://github.com/JetBrains/intellij-platform-plugin-template, I'm trying to use kotlinx.serialization for a plugin. However, despite multiple attempts with different configurations, I cannot make the plugin to get installed properly: my setup seems to be using an old KxS bundled with Kotlin instead of the one I'm telling it to use.
I tried entirely cleaning my Gradle cache, restarting the IDE, re-building from scratch without cache, hardcoding the dependencies in my
kts
file... (I've been trying for multiple previous Gradle versions too)To Reproduce
Use this
libs.versions.toml
(truncated for brevity):and this
build.gradle.kts
(truncated for brevity):Expected behavior
To use the version of the library I want it to use (1.6.3 here)
Environment