R
Thanks for this hint.
I added the kotlinx serilization and appled the plugin, resulting in this build.gradle.kts:
import com.soywiz.korge.gradle.*
buildscript {
val korgeVersion: String by project
val kotlinVersion: String by project
repositories {
mavenLocal()
maven { url = uri("https://dl.bintray.com/korlibs/korlibs") }
maven { url = uri("https://plugins.gradle.org/m2/") }
maven { url = uri( "https://dl.bintray.com/kotlin/kotlin-dev/")}
mavenCentral()
}
dependencies {
classpath("com.soywiz.korlibs.korge.plugins:korge-gradle-plugin:1.13.2.3")
classpath("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion")
}
}
apply<KorgeGradlePlugin>()
apply(plugin = "kotlinx-serialization")
korge {
id = "com.example.example"
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
add("commonMainApi", dependencyNotation = "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0")
}
But this wasn't enough, as I still cannot use the lib in the main.kt
I think I'm missing this part, using implementation, from the given example:
subprojects {
apply plugin: "kotlin-multiplatform"
apply plugin: "kotlinx-serialization"
kotlin {
jvm {
...
}
}
js {
...
}
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib-common')
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serializationRuntimeVersion"
...
But I faild to include something equivalent in my build.gradle.kts.
I also tried to use the build,gradle from the example and adapt it, but gave up after several attempts...
Maybe I have to do some serious research on gradle, gradle-kotlin-dsl and the gradle korge plugin, before I try this again...
Thanks for all the help!
Rainer