0cad069522
This is required to be able to compile KGP and it's dependencies which set LV to 1.4 when repo will use LV 1.9. This caused by the change how enums are compiled (KT-48872).
49 lines
1.4 KiB
Kotlin
49 lines
1.4 KiB
Kotlin
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
|
|
|
plugins {
|
|
kotlin("jvm")
|
|
}
|
|
|
|
kotlin {
|
|
explicitApi()
|
|
}
|
|
|
|
description = "Kotlin KLIB Library Commonizer API"
|
|
publish()
|
|
|
|
dependencies {
|
|
implementation(kotlinStdlib())
|
|
implementation(project(":native:kotlin-native-utils"))
|
|
testImplementation(project(":kotlin-test::kotlin-test-junit"))
|
|
testImplementation(commonDependency("junit:junit"))
|
|
testImplementation(projectTests(":compiler:tests-common"))
|
|
testRuntimeOnly(project(":native:kotlin-klib-commonizer"))
|
|
testImplementation(project(":kotlin-gradle-plugin"))
|
|
testImplementation(project(":kotlin-gradle-statistics"))
|
|
testImplementation(project(":kotlin-gradle-plugin-model"))
|
|
testImplementation(gradleApi())
|
|
testImplementation(gradleTestKit())
|
|
testImplementation(gradleKotlinDsl())
|
|
}
|
|
|
|
sourceSets {
|
|
"main" { projectDefault() }
|
|
"test" { projectDefault() }
|
|
}
|
|
|
|
projectTest(parallel = false) {
|
|
workingDir = projectDir
|
|
}
|
|
|
|
runtimeJar()
|
|
sourcesJar()
|
|
javadocJar()
|
|
|
|
// 1.9 level breaks Kotlin Gradle plugins via changes in enums (KT-48872)
|
|
// We limit api and LV until KGP will stop using Kotlin compiler directly (KT-56574)
|
|
tasks.withType<KotlinCompilationTask<*>>().configureEach {
|
|
compilerOptions.apiVersion.value(KotlinVersion.KOTLIN_1_8).finalizeValueOnRead()
|
|
compilerOptions.languageVersion.value(KotlinVersion.KOTLIN_1_8).finalizeValueOnRead()
|
|
}
|