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 {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user