Skip to content

Commit f6a1f7d

Browse files
committed
Enable parallel Gradle configuration by removing evaluationDependsOn
The build had evaluationDependsOn() calls that forced sequential configuration: - otel.java-conventions applied to ~400 projects, each waiting on :dependencyManagement - otel.bom-conventions looping through all subprojects - otel.javaagent-testing waiting on :testing:agent-for-testing Changes: - Removed evaluationDependsOn from convention plugins (otel.java-conventions, otel.bom-conventions, otel.javaagent-testing) - Kept evaluationDependsOn only in 2 BOM build.gradle.kts files where directly needed - Added explicit platform dependencies to ensure proper evaluation order Result: Projects can now configure in parallel instead of sequentially queuing behind dependencyManagement, significantly improving configuration time.
1 parent 4271fe9 commit f6a1f7d

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

bom-alpha/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ javaPlatform {
1010
allowDependencies()
1111
}
1212

13+
// Need this since we access :dependencyManagement configurations below
14+
evaluationDependsOn(":dependencyManagement")
15+
1316
dependencies {
1417
api(platform("io.opentelemetry:opentelemetry-bom"))
1518
api(platform("io.opentelemetry:opentelemetry-bom-alpha"))

bom/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ javaPlatform {
1010
allowDependencies()
1111
}
1212

13+
// Need this since we access :dependencyManagement configurations below
14+
evaluationDependsOn(":dependencyManagement")
15+
1316
dependencies {
1417
api(platform("io.opentelemetry:opentelemetry-bom"))
1518

conventions/src/main/kotlin/otel.bom-conventions.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ if (!project.name.startsWith("bom")) {
99
throw IllegalStateException("Name of BOM projects must start with 'bom'.")
1010
}
1111

12-
rootProject.subprojects.forEach { subproject ->
13-
if (!subproject.name.startsWith("bom")) {
14-
evaluationDependsOn(subproject.path)
15-
}
16-
}
1712
val otelBom = extensions.create<OtelBomExtension>("otelBom")
1813

1914
afterEvaluate {
@@ -41,7 +36,6 @@ afterEvaluate {
4136
}
4237

4338
// this applies version numbers to the SDK bom and SDK alpha bom which are dependencies of the instrumentation boms
44-
evaluationDependsOn(":dependencyManagement")
4539
val dependencyManagementConf = configurations.create("dependencyManagement") {
4640
isCanBeConsumed = false
4741
isCanBeResolved = false

conventions/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ afterEvaluate {
121121
}
122122
}
123123

124-
evaluationDependsOn(":dependencyManagement")
125124
val dependencyManagementConf = configurations.create("dependencyManagement") {
126125
isCanBeConsumed = false
127126
isCanBeResolved = false

conventions/src/main/kotlin/otel.javaagent-testing.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ plugins {
44
id("otel.java-conventions")
55
}
66

7-
evaluationDependsOn(":testing:agent-for-testing")
8-
97
dependencies {
108
annotationProcessor("com.google.auto.service:auto-service")
119
compileOnly("com.google.auto.service:auto-service")

0 commit comments

Comments
 (0)