Migrate bom project to kts. (#2638)
This commit is contained in:
parent
a92ad2a7a0
commit
94955b958f
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue