-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
38 lines (33 loc) · 1.28 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 {
id("otel.java-conventions")
}
val instrumentationProjectTest = tasks.named("test")
// batching up the muzzle tasks alphabetically into 4 chunks
// to split them up into separate CI jobs (but not too many CI job)
val instrumentationProjectMuzzle = listOf(
tasks.create("muzzle1"),
tasks.create("muzzle2"),
tasks.create("muzzle3"),
tasks.create("muzzle4")
)
var counter = 0
subprojects {
val subProj = this
plugins.withId("java") {
instrumentationProjectTest.configure {
dependsOn(subProj.tasks.named("test"))
}
// this only exists to make Intellij happy since it doesn't (currently at least) understand our
// inclusion of this artifact inside :testing-common
dependencies {
compileOnly(project(":testing:armeria-shaded-for-testing", configuration = "shadow"))
testCompileOnly(project(":testing:armeria-shaded-for-testing", configuration = "shadow"))
}
}
plugins.withId("io.opentelemetry.instrumentation.muzzle-check") {
// relying on predictable ordering of subprojects
// (see https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#N14CB4)
// since we are splitting these muzzleX tasks across different github action jobs
instrumentationProjectMuzzle[counter++ % 4].dependsOn(subProj.tasks.named("muzzle"))
}
}