ab146bd6d4
for migration to Gradle 7+ #KTI-559
65 lines
1.4 KiB
Groovy
65 lines
1.4 KiB
Groovy
description = 'Kotlin Test'
|
|
|
|
apply plugin: 'kotlin-platform-jvm'
|
|
|
|
archivesBaseName = 'kotlin-test'
|
|
|
|
JvmToolchain.configureJvmToolchain(project, JdkMajorVersion.JDK_1_6)
|
|
|
|
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
|
|
|
sourceSets {
|
|
if (includeJava9) {
|
|
java9
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
expectedBy project(':kotlin-test:kotlin-test-common')
|
|
api(kotlinStdlib())
|
|
testApi(project(":kotlin-test:kotlin-test-junit"))
|
|
testApi('junit:junit:4.12')
|
|
}
|
|
|
|
jar {
|
|
manifestAttributes(manifest, project, 'Test', true)
|
|
if (includeJava9) {
|
|
from sourceSets.java9.output
|
|
}
|
|
}
|
|
|
|
configureModularJar {
|
|
dependsOn(jar)
|
|
manifestAttributes(manifest, project, 'Test', true)
|
|
|
|
from zipTree(jar.outputs.files.singleFile)
|
|
}
|
|
|
|
configureSourcesJar()
|
|
|
|
configureJavadocJar()
|
|
|
|
compileKotlin {
|
|
kotlinOptions.freeCompilerArgs = [
|
|
"-Xallow-kotlin-package",
|
|
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
|
"-Xsuppress-deprecated-jvm-target-warning",
|
|
"-opt-in=kotlin.RequiresOptIn",
|
|
]
|
|
kotlinOptions.moduleName = project.archivesBaseName
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.freeCompilerArgs = [
|
|
"-Xallow-kotlin-package",
|
|
"-Xsuppress-deprecated-jvm-target-warning",
|
|
"-opt-in=kotlin.RequiresOptIn",
|
|
]
|
|
}
|
|
|
|
configureFrontendIr(project)
|
|
|
|
if (includeJava9) {
|
|
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test')
|
|
}
|