Use deployVersion if present for artifacts-tests

^KTI-1476
This commit is contained in:
Bogdan Mukvich
2023-12-11 15:48:11 +01:00
committed by Space Team
parent 2932f49f65
commit b76452e15f
+11 -3
View File
@@ -1,5 +1,3 @@
import java.nio.file.Paths
plugins {
kotlin("jvm")
}
@@ -13,10 +11,20 @@ dependencies {
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`" }
}
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 kotlinVersion = version
doFirst {
val defaultMavenLocal = rootProject.projectDir.resolve("build/repo").absolutePath
val mavenLocal = System.getProperty("maven.repo.local") ?: defaultMavenLocal