blob: 4aecb1e7b803ccf617382a2c8092e3e02a359558 [file] [log] [blame]
description = 'Kotlin Test'
apply plugin: 'kotlin-platform-jvm'
archivesBaseName = 'kotlin-test'
configureJvm6Project(project)
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
sourceSets {
if (includeJava9) {
java9
}
}
dependencies {
expectedBy project(':kotlin-test:kotlin-test-common')
compile kotlinStdlib()
testCompile project(":kotlin-test:kotlin-test-junit")
testCompile('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",
"-Xnormalize-constructor-calls=enable",
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
"-Xsuppress-deprecated-jvm-target-warning",
"-Xopt-in=kotlin.RequiresOptIn",
]
kotlinOptions.moduleName = project.archivesBaseName
}
compileTestKotlin {
kotlinOptions.freeCompilerArgs = [
"-Xallow-kotlin-package",
"-Xsuppress-deprecated-jvm-target-warning",
"-Xopt-in=kotlin.RequiresOptIn",
]
}
configureJvmIrBackend(project)
if (includeJava9) {
compileJava9Sources(project, 'kotlin.test')
}