Patrick
05/22/2020, 12:43 PMCannot access 'Serializable': it is internal in '<http://kotlin.io|kotlin.io>'
Nikky
05/22/2020, 12:44 PMPatrick
05/22/2020, 12:44 PMplugins {
kotlin("multiplatform") version "1.3.72"
kotlin("plugin.serialization") version "1.3.72"
}
repositories {
mavenCentral()
jcenter()
}
kotlin {
val korioVersion = "1.10.0"
val serializationVersion = "0.20.0"
// For ARM, should be changed to iosArm32 or iosArm64
// For Linux, should be changed to e.g. linuxX64
// For MacOS, should be changed to e.g. macosX64
// For Windows, should be changed to e.g. mingwX64
mingwX64("mingw") {
binaries {
executable {
entryPoint("barcodeParser.main")
}
}
}
jvm {
}
js {
browser {
}
}
sourceSets {
commonMain {
dependencies {
implementation(kotlin("stdlib-common"))
api("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serializationVersion")
}
}
commonTest {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
jvm().compilations["main"].defaultSourceSet {
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
}
jvm().compilations["test"].defaultSourceSet {
dependencies {
implementation(kotlin("test-junit"))
}
}
mingwX64().compilations["main"].defaultSourceSet {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serializationVersion")
}
}
mingwX64().compilations["test"].defaultSourceSet {
}
js().compilations["main"].defaultSourceSet {
dependencies {
implementation(kotlin("stdlib-js"))
}
}
js().compilations["test"].defaultSourceSet {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}
Patrick
05/22/2020, 12:45 PMNikky
05/22/2020, 12:45 PMkotlinx.serialization
Patrick
05/22/2020, 12:45 PMNikky
05/22/2020, 12:46 PMNikky
05/22/2020, 12:47 PMimport kotlinx.serialization.*
Patrick
05/22/2020, 12:48 PMimport kotlinx.serialization.*
Now I don't have the error in the idea but still when I try to compile it for jvm or nativeNikky
05/22/2020, 12:48 PMSerialization
should not be in <http://kotlin.io|kotlin.io>
Patrick
05/22/2020, 12:48 PMNikky
05/22/2020, 12:49 PMPatrick
05/22/2020, 12:49 PMNikky
05/22/2020, 12:50 PMPatrick
05/22/2020, 12:51 PMenableFeaturePreview('GRADLE_METADATA')
Nikky
05/22/2020, 12:51 PMNikky
05/22/2020, 12:51 PMPatrick
05/22/2020, 12:52 PMPatrick
05/22/2020, 1:00 PMPatrick
05/22/2020, 1:08 PMrusshwolf
05/22/2020, 1:29 PMimplementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-jvm:$serializationVersion")
in your jvm dependencies and implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$serializationVersion")
in js. Or you can change the common dependency to implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serializationVersion")
and then you don't need the restPatrick
05/22/2020, 1:32 PMPatrick
05/22/2020, 1:34 PMrusshwolf
05/22/2020, 1:37 PMPatrick
05/22/2020, 1:43 PM