| buildscript { |
| ext.serialization_version = mainLibVersion |
| |
| repositories { |
| mavenCentral() |
| jcenter() |
| maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" } |
| } |
| } |
| |
| /* |
| * Copyright 2017-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
| */ |
| |
| // see ../settings.gradle so this plugins could be resolved |
| plugins { |
| id 'kotlin-multiplatform' |
| id 'kotlinx-serialization' |
| } |
| |
| repositories { |
| mavenCentral() |
| maven { url "https://kotlin.bintray.com/kotlinx" } |
| } |
| |
| group 'com.example' |
| version '0.0.1' |
| |
| apply plugin: 'maven-publish' |
| |
| kotlin { |
| jvm() |
| js { |
| nodejs() |
| } |
| // 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 |
| macosX64("macos") |
| sourceSets { |
| commonMain { |
| dependencies { |
| implementation kotlin('stdlib-common') |
| implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serialization_version" |
| } |
| } |
| commonTest { |
| dependencies { |
| implementation kotlin('test-common') |
| implementation kotlin('test-annotations-common') |
| } |
| } |
| jvmMain { |
| dependencies { |
| implementation kotlin('stdlib-jdk8') |
| implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_version" |
| |
| } |
| } |
| jvmTest { |
| dependencies { |
| implementation kotlin('test') |
| implementation kotlin('test-junit') |
| } |
| } |
| jsMain { |
| dependencies { |
| implementation kotlin('stdlib-js') |
| implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:$serialization_version" |
| } |
| } |
| jsTest { |
| dependencies { |
| implementation kotlin('test-js') |
| } |
| } |
| macosMain { |
| dependencies { |
| implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serialization_version" |
| } |
| } |
| macosTest { |
| } |
| } |
| } |
| |
| task run dependsOn "check" |