Publish BOM for alpha artifacts. (#2669)

This commit is contained in:
Anuraag Agrawal 2021-02-03 02:03:09 +09:00 committed by GitHub
parent 527b5f4549
commit 8fc392e8ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,30 @@
plugins {
id("java-platform")
id("maven-publish")
}
description = "OpenTelemetry Bill of Materials (Alpha)"
group = "io.opentelemetry"
base.archivesBaseName = "opentelemetry-bom-alpha"
rootProject.subprojects.forEach { subproject ->
if (!project.name.startsWith("bom")) {
evaluationDependsOn(subproject.path)
}
}
afterEvaluate {
dependencies {
constraints {
rootProject.subprojects
.sortedBy { it.findProperty("archivesBaseName") as String? }
.filter { !it.name.startsWith("bom") }
.filter { it.findProperty("otel.release") == "alpha" }
.forEach { project ->
project.plugins.withId("maven-publish") {
api(project)
}
}
}
}
}

View File

@ -0,0 +1 @@
otel.release=alpha

View File

@ -18,7 +18,7 @@ afterEvaluate {
constraints {
rootProject.subprojects
.sortedBy { it.findProperty("archivesBaseName") as String? }
.filter { it.name != project.name }
.filter { !it.name.startsWith("bom")}
.filter { !it.hasProperty("otel.release") }
.forEach { project ->
project.plugins.withId("maven-publish") {

View File

@ -41,6 +41,7 @@ include ":all",
":api:metrics",
":semconv",
":bom",
":bom-alpha",
":dependencyManagement",
":extensions:annotations",
":extensions:kotlin",