-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle.kts
38 lines (32 loc) · 1.07 KB
/
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
plugins {
base
id("com.carbonblack.gradle-dockerized-wrapper") version "1.2.1"
// Pinned versions of plugins used by subprojects
id("com.carbonblack.gradle-connector-python") version "2.1.1"
id("com.jfrog.artifactory") version "4.15.1" apply false
id("com.palantir.git-version") version "0.12.3" apply false
id("com.bmuschko.docker-remote-api") version "6.4.0" apply false
}
// This is running in a docker container so this value comes from the container OS.
val osVersionClassifier: String
get() {
return try {
val versionText = File("/etc/redhat-release").readText()
when {
versionText.contains("release 8") -> "el8"
else -> "el7"
}
} catch (ignored: Exception) {
"el7"
}
}
buildDir = file("build/$osVersionClassifier")
val buildRpm = tasks.named("buildRpm").configure {
dependsOn(tasks.named("runPyTest"))
}
val buildTask = tasks.named("build").configure {
dependsOn(tasks.named("buildRpm"))
}
python {
sourceExcludes.add("smoketest/")
}