If memory serves, when using Kotlin serialization with KMP, I had to tell Gradle that I was using "experimental" features. Is this still necessary with Kotlin 1.4.0 code that is JVM (not KMP)? When I enable the serialization plugin, all dependencies are colored red in IntelliJ with no clear error message. A pointer to a working sample Kotlin/JVM app using 1.4.0 serialization in a Kotlin DSL gradle file would be very helpful.
n
Nikky
08/27/2020, 8:14 AM
i don't think those experimental features are necessary to be declared .. except maybe for the
-Xopt-in=kotlin.RequiresOptIn
flags to hide warning fur doing
@OptIn
might also depend on the gradle version.. if you mean gradle experimental features.. i am using serialization on a JVM project with gradle 6.6
p
pajatopmr
08/27/2020, 8:27 AM
@Nikky Any chance your project is publicly viewable? Here's my build.gradle.kts file as it looks in IntelliJ:
n
Nikky
08/27/2020, 8:29 AM
it is: https://github.com/NikkyAI/Sibyl
it is doing a bit more complicated stuff though.. multi modules and i moved some buildscript logic into plugin that are in a included build
Nikky
08/27/2020, 8:30 AM
and in case you get confused by using
_
for versions.. that is #gradle-refresh-versions in action.. look at