Files
kotlin-fork/repo/artifacts-tests/build.gradle.kts
T
cristiangarcia a9d0e8574e Make artifacts-tests:test ConfigurationCache compatible
Required for KTI-1553
2024-02-12 12:06:12 +00:00

35 lines
1.3 KiB
Kotlin

plugins {
kotlin("jvm")
}
dependencies {
testImplementation(kotlinStdlib("jdk8"))
testImplementation(kotlinTest("junit5"))
testApi(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine)
testImplementation(projectTests(":compiler:tests-common-new"))
}
val defaultSnapshotVersion: String by extra
findProperty("deployVersion")?.let {
assert(findProperty("build.number") != null) { "`build.number` parameter is expected to be explicitly set with the `deployVersion`" }
}
projectTest(jUnitMode = JUnitMode.JUnit5) {
workingDir = rootDir
useJUnitPlatform { }
val buildNumber by extra(findProperty("build.number")?.toString() ?: defaultSnapshotVersion)
val kotlinVersion by extra(
findProperty("deployVersion")?.toString()?.let { deploySnapshotStr ->
if (deploySnapshotStr != "default.snapshot") deploySnapshotStr else defaultSnapshotVersion
} ?: buildNumber
)
val defaultMavenLocal: String = rootProject.projectDir.resolve("build/repo").absolutePath
val mavenLocal = System.getProperty("maven.repo.local") ?: defaultMavenLocal
doFirst {
systemProperty("maven.repo.local", mavenLocal)
systemProperty("kotlin.version", kotlinVersion)
}
}