|
|
|
@ -2,8 +2,8 @@ import org.gradle.api.NamedDomainObjectContainer
|
|
|
|
|
import org.gradle.api.Project |
|
|
|
|
import org.gradle.api.artifacts.ProjectDependency |
|
|
|
|
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension |
|
|
|
|
import org.jetbrains.kotlin.gradle.kpm.external.ExternalVariantApi |
|
|
|
|
import org.jetbrains.kotlin.gradle.kpm.external.project |
|
|
|
|
//import org.jetbrains.kotlin.gradle.kpm.external.ExternalVariantApi |
|
|
|
|
//import org.jetbrains.kotlin.gradle.kpm.external.project |
|
|
|
|
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler |
|
|
|
|
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet |
|
|
|
|
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetContainer |
|
|
|
@ -17,9 +17,9 @@ val Project.isFailingJsCase: Boolean
|
|
|
|
|
get() = this.name.contains("-failingJs-") |
|
|
|
|
|
|
|
|
|
val Project.isMingwX64Enabled: Boolean |
|
|
|
|
get() = this.isInIdea |
|
|
|
|
get() = false // this.isInIdea |
|
|
|
|
|
|
|
|
|
@OptIn(ExternalVariantApi::class) |
|
|
|
|
//@OptIn(ExternalVariantApi::class) |
|
|
|
|
fun KotlinMultiplatformExtension.configureTargets() { |
|
|
|
|
jvm("desktop") |
|
|
|
|
configureJsTargets() |
|
|
|
@ -30,7 +30,7 @@ fun KotlinMultiplatformExtension.configureTargets() {
|
|
|
|
|
macosX64() |
|
|
|
|
macosArm64() |
|
|
|
|
// We use linux agents on CI. So it doesn't run the tests, but it builds the klib anyway which is time consuming. |
|
|
|
|
if (project.isMingwX64Enabled) mingwX64() |
|
|
|
|
// if (project.isMingwX64Enabled) mingwX64() |
|
|
|
|
linuxX64() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -41,13 +41,13 @@ fun KotlinMultiplatformExtension.configureJsTargets() {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@OptIn(ExternalVariantApi::class) |
|
|
|
|
//@OptIn(ExternalVariantApi::class) |
|
|
|
|
fun KotlinDependencyHandler.getLibDependencyForMain(): ProjectDependency { |
|
|
|
|
if (!project.name.endsWith("-main")) error("Unexpected main module name: ${project.name}") |
|
|
|
|
return project(":" + project.name.replace("-main", "-lib")) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@OptIn(ExternalVariantApi::class) |
|
|
|
|
//@OptIn(ExternalVariantApi::class) |
|
|
|
|
fun KotlinDependencyHandler.getCommonLib(): ProjectDependency { |
|
|
|
|
return project(":common") |
|
|
|
|
} |
|
|
|
|