50 lines
1006 B
Groovy
50 lines
1006 B
Groovy
description = 'Kotlin Test JUnit'
|
|
|
|
apply plugin: 'kotlin-platform-jvm'
|
|
|
|
JvmToolchain.configureJvmToolchain(project, JdkMajorVersion.JDK_1_8)
|
|
|
|
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
|
|
|
|
sourceSets {
|
|
if (includeJava9) {
|
|
java9
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
|
api project(':kotlin-test:kotlin-test-jvm')
|
|
api('junit:junit:4.13.2')
|
|
}
|
|
|
|
|
|
jar {
|
|
manifestAttributes(manifest, project, 'Test', true)
|
|
if (includeJava9) {
|
|
from sourceSets.java9.output
|
|
}
|
|
}
|
|
|
|
configureSourcesJar()
|
|
configureJavadocJar()
|
|
|
|
compileKotlin {
|
|
kotlinOptions.freeCompilerArgs = [
|
|
"-Xallow-kotlin-package",
|
|
]
|
|
kotlinOptions.moduleName = project.name
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions.freeCompilerArgs = [
|
|
"-Xallow-kotlin-package",
|
|
]
|
|
}
|
|
|
|
configureFrontendIr(project)
|
|
|
|
if (includeJava9) {
|
|
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test.junit')
|
|
}
|