1 /* 2 * Copyright 2017-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 import Java9Modularity.configureJava9ModuleInfo 5 import org.jetbrains.kotlin.gradle.targets.js.testing.* 6 <lambda>null7plugins { 8 kotlin("multiplatform") 9 kotlin("plugin.serialization") 10 } 11 12 apply(from = rootProject.file("gradle/native-targets.gradle")) 13 apply(from = rootProject.file("gradle/configure-source-sets.gradle")) 14 15 // disable kover tasks because there are no non-test classes in the project <lambda>null16tasks.named("koverHtmlReport") { 17 enabled = false 18 } <lambda>null19tasks.named("koverXmlReport") { 20 enabled = false 21 } <lambda>null22tasks.named("koverVerify") { 23 enabled = false 24 } 25 <lambda>null26kotlin { 27 sourceSets { 28 configureEach { 29 languageSettings { 30 optIn("kotlinx.serialization.internal.CoreFriendModuleApi") 31 optIn("kotlinx.serialization.json.internal.JsonFriendModuleApi") 32 } 33 } 34 val commonTest by getting { 35 dependencies { 36 api(project(":kotlinx-serialization-json")) 37 api(project(":kotlinx-serialization-json-okio")) 38 implementation("com.squareup.okio:okio:${property("okio_version")}") 39 } 40 } 41 42 val jvmTest by getting { 43 dependencies { 44 implementation("com.google.code.gson:gson:2.8.5") 45 implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${property("coroutines_version")}") 46 } 47 } 48 } 49 } 50 51 project.configureJava9ModuleInfo() 52 53 // TODO: Remove this after okio will be updated to the version with 1.9.20 stdlib dependency <lambda>null54configurations.all { 55 resolutionStrategy.eachDependency { 56 if (requested.name == "kotlin-stdlib-wasm") { 57 useTarget("org.jetbrains.kotlin:kotlin-stdlib-wasm-js:${requested.version}") 58 } 59 } 60 } 61