• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 import org.jetbrains.kotlin.gradle.plugin.*
5 
KotlinSourceSetnull6 fun KotlinSourceSet.configureMultiplatform() {
7     val srcDir = if (name.endsWith("Main")) "src" else "test"
8     val platform = name.dropLast(4)
9     kotlin.srcDir("$platform/$srcDir")
10     if (name == "jvmMain") {
11         resources.srcDir("$platform/resources")
12     } else if (name == "jvmTest") {
13         resources.srcDir("$platform/test-resources")
14     }
15     languageSettings {
16         optInAnnotations.forEach { optIn(it) }
17         progressiveMode = true
18     }
19 }
20