diff --git a/bom/build.gradle b/bom/build.gradle deleted file mode 100644 index ddef997d59..0000000000 --- a/bom/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id "java-platform" - id "maven-publish" -} - -description = 'OpenTelemetry Bill of Materials' -group = "io.opentelemetry" -archivesBaseName = "opentelemetry-bom" - -afterEvaluate { - dependencies { - constraints { - rootProject.subprojects.sort { "$it.archivesBaseName" } - .collect { it } - .findAll { it.name != project.name } - // We only include prod artifacts, which is the default when otel.release isn't set. - .findAll { it.findProperty("otel.release") == null } - .each { project -> - project.plugins.withId("maven-publish") { - api project - } - } - } - } -} \ No newline at end of file diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts new file mode 100644 index 0000000000..8f7085d5ba --- /dev/null +++ b/bom/build.gradle.kts @@ -0,0 +1,30 @@ +plugins { + id("java-platform") + id("maven-publish") +} + +description = "OpenTelemetry Bill of Materials" +group = "io.opentelemetry" +base.archivesBaseName = "opentelemetry-bom" + +rootProject.subprojects.forEach { subproject -> + if (project != subproject) { + evaluationDependsOn(subproject.path) + } +} + +afterEvaluate { + dependencies { + constraints { + rootProject.subprojects + .sortedBy { it.findProperty("archivesBaseName") as String? } + .filter { it.name != project.name } + .filter { !it.hasProperty("otel.release") } + .forEach { project -> + project.plugins.withId("maven-publish") { + api(project) + } + } + } + } +}