Files
kotlin-fork/libraries/kotlin.test/junit5/build.gradle
T
Alexander Udalov 0925e1b497 Enable JVM IR for stdlib/reflect/test libraries
Changes in Gradle integration tests are needed because:
- in new-mpp-android, kotlin-stdlib-jdk8 is used, and JVM IR generates
  JDK 8-specific bytecode (invokedynamic). D8 needs to be configured to
  desugar it with source/target versions set to 1.8, otherwise it
  reports an error.
- in AndroidExtensionsManyVariants and AndroidIcepickProject, D8 fails
  with assertions enabled if AGP < 4.0.0 is used because of
  https://issuetracker.google.com/issues/148661132. The tests which use
  old AGP versions are probably not relevant anymore anyway.

Changes in kotlin-stdlib-runtime-merged.txt are caused by a slightly
different generation scheme of collection subclasses in JVM IR, and are
harmless.

(Previous attempt was at 15e978dbd311c2ba78ec32b394c21acde9811ccb.)
2021-08-05 12:36:35 +02:00

53 lines
1.1 KiB
Groovy

description = 'Kotlin Test JUnit 5'
apply plugin: 'kotlin-platform-jvm'
def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties)
sourceSets {
if (includeJava9) {
java9
}
}
project.ext["jpsLibraryPath"] = rootProject.distLibDir
dependencies {
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
compile project(':kotlin-test:kotlin-test-jvm')
compile("org.junit.jupiter:junit-jupiter-api:5.0.0")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.2.0")
}
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",
]
}
if (includeJava9) {
LibrariesCommon.configureJava9Compilation(project, 'kotlin.test.junit5')
}
test {
useJUnitPlatform()
}