Hi all, I really fell in love in single-file Kotlin scripts, and I also like staying close to Kotlin-centric libraries. A problem occurs when I try to use e. g. kotlinx.serialization. See https://youtrack.jetbrains.com/issue/KT-47384. Is there any sane workaround, or a concrete plan to solve it? I created it as a bug, but it got converted to a feature request without any comment đ
b
Ben Woodworth
06/27/2021, 6:32 PM
My solution is to execute the script with the -Xplugin argument. I add it to my script's shebang:
Just make sure the KOTLIN_HOME environment variable is set. And I'm not sure if there's an equivalent for e.g. Windows, but on my linux machine it works well.
đ 1
đ 1
p
Piotr KrzemiĆski
06/28/2021, 6:24 AM
thanks Ben, it got me unblocked! I wrote more in the comment under the issue