• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 import Java9Modularity.configureJava9ModuleInfo
2 import org.jetbrains.kotlin.gradle.tasks.*
3 
4 /*
5  * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
6  */
7 
<lambda>null8 plugins {
9     kotlin("multiplatform")
10     alias(libs.plugins.serialization)
11 
12     id("native-targets-conventions")
13     id("source-sets-conventions")
14 }
15 
16 // disable kover tasks because there are no tests in the project
<lambda>null17 tasks.named("koverHtmlReport") {
18     enabled = false
19 }
<lambda>null20 tasks.named("koverXmlReport") {
21     enabled = false
22 }
<lambda>null23 tasks.named("koverVerify") {
24     enabled = false
25 }
26 
<lambda>null27 kotlin {
28     sourceSets {
29         configureEach {
30             languageSettings {
31                 optIn("kotlinx.serialization.internal.CoreFriendModuleApi")
32                 optIn("kotlinx.serialization.json.internal.JsonFriendModuleApi")
33             }
34         }
35         commonMain {
36             dependencies {
37                 api(project(":kotlinx-serialization-core"))
38             }
39         }
40         register("jsWasmMain") {
41             dependsOn(commonMain.get())
42         }
43         named("jsMain") {
44             dependsOn(named("jsWasmMain").get())
45         }
46         named("wasmJsMain") {
47             dependsOn(named("jsWasmMain").get())
48         }
49         named("wasmWasiMain") {
50             dependsOn(named("jsWasmMain").get())
51         }
52     }
53 }
54 
55 // This task should be disabled because of no need to build and publish intermediate JsWasm sourceset
<lambda>null56 tasks.whenTaskAdded {
57     if (name == "compileJsWasmMainKotlinMetadata") {
58         enabled = false
59     }
60 }
61 
62 configureJava9ModuleInfo()
63