Use deployVersion if present for artifacts-tests
^KTI-1476
This commit is contained in:
committed by
Space Team
parent
2932f49f65
commit
b76452e15f
@@ -1,5 +1,3 @@
|
|||||||
import java.nio.file.Paths
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
}
|
}
|
||||||
@@ -13,10 +11,20 @@ dependencies {
|
|||||||
testImplementation(projectTests(":compiler:tests-common-new"))
|
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) {
|
projectTest(jUnitMode = JUnitMode.JUnit5) {
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
useJUnitPlatform { }
|
useJUnitPlatform { }
|
||||||
val kotlinVersion = version
|
|
||||||
doFirst {
|
doFirst {
|
||||||
val defaultMavenLocal = rootProject.projectDir.resolve("build/repo").absolutePath
|
val defaultMavenLocal = rootProject.projectDir.resolve("build/repo").absolutePath
|
||||||
val mavenLocal = System.getProperty("maven.repo.local") ?: defaultMavenLocal
|
val mavenLocal = System.getProperty("maven.repo.local") ?: defaultMavenLocal
|
||||||
|
|||||||
Reference in New Issue
Block a user