Make artifacts-tests:test ConfigurationCache compatible

Required for KTI-1553
This commit is contained in:
cristiangarcia
2024-02-11 23:39:08 +01:00
committed by Space Team
parent 5836067082
commit a9d0e8574e
+8 -8
View File
@@ -15,19 +15,19 @@ 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`" }
}
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
)
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 {
val defaultMavenLocal = rootProject.projectDir.resolve("build/repo").absolutePath
val mavenLocal = System.getProperty("maven.repo.local") ?: defaultMavenLocal
systemProperty("maven.repo.local", mavenLocal)
systemProperty("kotlin.version", kotlinVersion)
}