Skip to content

Commit 4cf3230

Browse files
committed
Fix BOM generation with parallel configuration
The BOM convention plugin needs to force evaluation of all non-BOM subprojects before filtering them by plugin and adding as dependency constraints. Without this, when parallel configuration is enabled, the published BOMs have missing or incomplete dependency constraints which causes resolution failures in downstream builds like examples/distro.
1 parent f6a1f7d commit 4cf3230

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

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

12+
// Force evaluation of all non-BOM subprojects so that we can filter them by plugin
13+
// and add them as dependency constraints below
14+
rootProject.subprojects.forEach { subproject ->
15+
if (!subproject.name.startsWith("bom")) {
16+
evaluationDependsOn(subproject.path)
17+
}
18+
}
19+
1220
val otelBom = extensions.create<OtelBomExtension>("otelBom")
1321

1422
afterEvaluate {

0 commit comments

Comments
 (0)