Make some test tasks depending on dist

This commit is contained in:
Ilya Matveev
2018-04-22 18:37:28 +07:00
committed by ilmat192
parent b03f0bfc83
commit 772c48e61e
2 changed files with 19 additions and 3 deletions
+10 -2
View File
@@ -20,7 +20,8 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin"
}
if (!hasProperty("konan.home")) {
ext.useCustomDist = project.hasProperty("konan.home")
if (!useCustomDist) {
ext.setProperty("konan.home", distDir.absolutePath)
}
}
@@ -34,7 +35,14 @@ konanArtifacts {
}
testFiles.files.each { file ->
def name = file.name
library(name.take(name.lastIndexOf('.'))) { srcFiles file.absolutePath }
library(name.take(name.lastIndexOf('.'))) {
srcFiles file.absolutePath
// Build the compiler before building the test unless a custom path to the distribution is specified.
if (!useCustomDist) {
dependsOn ':dist'
}
}
}
}