Skip to content

Commit

Permalink
Demonstrate publishing bom with old artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Aug 25, 2022
1 parent 160af1c commit f3477a5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -260,7 +260,6 @@ dependency as follows, replacing `{{artifact-id}}` with the value from the "Arti
| [OTLP Common](./exporters/otlp/common) | Shared OTLP components (internal) | `opentelemetry-exporter-otlp-common` | <!--VERSION_STABLE-->1.17.0<!--/VERSION_STABLE--> |
| [Jaeger gRPC Exporter](./exporters/jaeger) | Jaeger gRPC trace exporter | `opentelemetry-exporter-jaeger` | <!--VERSION_STABLE-->1.17.0<!--/VERSION_STABLE--> |
| [Jaeger Thrift Exporter](./exporters/jaeger-thrift) | Jaeger thrift trace exporter | `opentelemetry-exporter-jaeger-thift` | <!--VERSION_STABLE-->1.17.0<!--/VERSION_STABLE--> |
| [Jaeger Proto](./exporters/jaeger-proto) | Jaeger gRPC protobuf definitions (deprecated) | `opentelemetry-exporter-jaeger-proto` | <!--VERSION_STABLE-->1.17.0<!--/VERSION_STABLE--> |
| [Logging Exporter](./exporters/logging) | Logging exporters, includings metrics, traces, and logs | `opentelemetry-exporter-logging` | <!--VERSION_STABLE-->1.17.0<!--/VERSION_STABLE--> |
| [OTLP Logging Exporter](./exporters/logging-otlp) | Logging exporters in OTLP protobuf JSON format, including metrics, traces, and logs | `opentelemetry-exporter-logging-otlp` | <!--VERSION_STABLE-->1.17.0<!--/VERSION_STABLE--> |
| [Zipkin Exporter](./exporters/zipkin) | Zipkin trace exporter | `opentelemetry-exporter-zipkin` | <!--VERSION_STABLE-->1.17.0<!--/VERSION_STABLE--> |
Expand Down
3 changes: 2 additions & 1 deletion bom/build.gradle.kts
Expand Up @@ -6,4 +6,5 @@ description = "OpenTelemetry Bill of Materials"
group = "io.opentelemetry"
base.archivesName.set("opentelemetry-bom")

otelBom.projectFilter.set { !it.hasProperty("otel.release") }
otelBom.projectFilter.set { !it.hasProperty("otel.release") }
otelBom.addFallback("opentelemetry-exporter-jaeger-proto", "1.17.0")
Expand Up @@ -6,9 +6,15 @@
package io.opentelemetry.gradle

import org.gradle.api.Project
import org.gradle.api.model.ObjectFactory
import org.gradle.api.provider.Property
import java.util.function.Predicate

abstract class OtelBomExtension {
abstract val projectFilter: Property<Predicate<Project>>
var fallbacks: MutableSet<String> = hashSetOf()

fun addFallback(artifactId: String, version: String) {
this.fallbacks.add("io.opentelemetry:" + artifactId + ":" + version)
}
}
8 changes: 8 additions & 0 deletions buildSrc/src/main/kotlin/otel.bom-conventions.gradle.kts
Expand Up @@ -54,11 +54,19 @@ afterEvaluate {
outputFile.writeText(substitutionSnippet)
}
}
val fallbacks = otelBom.fallbacks
bomProjects.forEach { project ->
dependencies {
constraints {
api(project)
}
}
}
fallbacks.forEach { fallback ->
dependencies {
constraints {
api(fallback)
}
}
}
}
1 change: 0 additions & 1 deletion exporters/jaeger-proto/build.gradle.kts
@@ -1,6 +1,5 @@
plugins {
id("otel.protobuf-conventions")
id("otel.publish-conventions")

id("otel.animalsniffer-conventions")
}
Expand Down

0 comments on commit f3477a5

Please sign in to comment.