One other source of confusion is Kotlin serializat...
# touchlab-tools
d
One other source of confusion is Kotlin serialization. Sometimes specified as
kotlin-serialization
and sometimes as
kotlinx-serialization
. I have seen it specified in different ways: 1) as
plugins{ id("kotlinx-serialization") }
in *common*’s build.gradle.kts file 2) as
plugins{ kotlin("plugin.serialization") }
in *common*’s build.gradle.kts file 3) as
kotlin{ sourceSets{ dependencies{ implementation("org.jetbrains.kotlinx:kotlinx-serialization-core) }}}
in *common*’s build.gradle.kts file 4) as
buildscript{ dependencies{ classpath("org.jetbrains.kotlin:kotlin-serialization") }}
in project-level build.gradle.kts file
r
These are all slightly different things. The first two are essentially just aliases of each other, and indicate that you are applying the serialization gradle plugin to the project. That's what enables the compiler magic that serialization does. The third is a runtime dependency, which the gradle plugin interacts with but doesn't include automatically. The fourth points to maven coordinates for the plugin, so the build can find where to resolve the plugin id.
d
ok, so I guess 2-3-4 are needed
but actually, I just verified my app compiles and runs without 3)