forked from spekframework/spek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
38 lines (31 loc) · 961 Bytes
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import java.nio.file.Files
import java.nio.file.Paths
plugins {
id("org.ajoberstar.reckon") version "0.9.0"
}
reckon {
scopeFromProp()
stageFromProp("alpha", "rc", "final")
}
allprojects {
repositories {
jcenter()
}
if (Files.exists(Paths.get("$rootDir/local.properties"))) {
val localProperties = java.util.Properties()
localProperties.load(java.io.FileInputStream("$rootDir/local.properties"))
localProperties.forEach { prop -> project.extra.set(prop.key as String, prop.value) }
}
var releaseMode = false
if ("$version".matches(Regex("^\\d+\\.\\d+\\.\\d+(-rc\\.\\d+)?"))) {
releaseMode = true
}
project.extra["releaseMode"] = releaseMode
}
listOf("check", "build", "clean").forEach { taskName ->
task(taskName) {
gradle.includedBuilds.forEach { includedBuild ->
dependsOn(gradle.includedBuild(includedBuild.name).task(":$taskName"))
}
}
}