Skip to content

Commit

Permalink
Leverage boms for transient core deps (#652)
Browse files Browse the repository at this point in the history
* leverage boms for transient core deps

* use alpha to version main instrumentation version

* fix platform dep usage
  • Loading branch information
breedx-splk authored Oct 28, 2024
1 parent e785fc6 commit 536db5f
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 22 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,17 @@ jobs:
else
prior_version="$major.$minor.$((patch - 1))"
fi
inst_version=$(grep ^opentelemetry-alpha gradle/libs.versions.toml | sed -E "s/^.*\"(.*)\"/\1/")
sdk_version=$(cat gradle/libs.versions.toml | grep "^opentelemetry =" | sed -E "s/^.*\"(.*)\"/\1/")
# otel instrumentation version comes in through alpha bom
# inst_version=$(grep ^opentelemetry-alpha gradle/libs.versions.toml | sed -E "s/^.*\"(.*)\"/\1/")
inst_version=$(./gradlew --console=plain android-agent:dependencies | \
grep 'io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom ' | \
sed -e "s/.* -> //" | sed -e "s/ .*//" | \
sort | head -1)
# otel-java core libs are transient deps thru instrumentation boms
sdk_version=$(./gradlew --console=plain android-agent:dependencies | \
grep 'io.opentelemetry:opentelemetry-api ' | \
sed -e "s/.* -> //" | sed -e "s/ .*//" | \
sort | head -1)

echo "VERSION=$version" >> $GITHUB_ENV
echo "PRIOR_VERSION=$prior_version" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dependencies {
implementation(libs.androidx.navigation.fragment)
implementation(libs.androidx.lifecycle.process)

api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
implementation(libs.opentelemetry.sdk)
implementation(libs.opentelemetry.api.incubator)
Expand Down
15 changes: 7 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[versions]
opentelemetry = "1.43.0"
opentelemetry-alpha = "1.43.0-alpha"
opentelemetry-instrumentation = "2.9.0"
opentelemetry-instrumentation-alpha = "2.9.0-alpha"
#opentelemetry-instrumentation = "2.9.0" // alpha bom includes non-alpha bom
opentelemetry-semconv = "1.25.0-alpha"
opentelemetry-contrib = "1.40.0-alpha"
mockito = "5.14.2"
Expand All @@ -16,7 +14,8 @@ junitKtx = "1.2.1"
autoService = "1.1.1"

[libraries]
opentelemetry-platform = { module = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom", version.ref = "opentelemetry-instrumentation" }
opentelemetry-platform-alpha = { module = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha", version.ref = "opentelemetry-instrumentation-alpha" }
opentelemetry-platform = { module = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom" }
androidx-navigation-fragment = "androidx.navigation:navigation-fragment:2.7.7"
androidx-core = "androidx.core:core:1.13.1"
androidx-lifecycle-process = "androidx.lifecycle:lifecycle-process:2.8.6"
Expand All @@ -30,18 +29,18 @@ opentelemetry-semconv = { module = "io.opentelemetry.semconv:opentelemetry-semco
opentelemetry-semconv-incubating = { module = "io.opentelemetry.semconv:opentelemetry-semconv-incubating", version.ref = "opentelemetry-semconv" }
opentelemetry-api = { module = "io.opentelemetry:opentelemetry-api" }
opentelemetry-api-incubator = { module = "io.opentelemetry:opentelemetry-api-incubator" }
opentelemetry-sdk-extension-incubator = { module = "io.opentelemetry:opentelemetry-sdk-extension-incubator", version.ref = "opentelemetry-alpha" }
opentelemetry-sdk-extension-incubator = { module = "io.opentelemetry:opentelemetry-sdk-extension-incubator" }
opentelemetry-sdk = { module = "io.opentelemetry:opentelemetry-sdk" }
opentelemetry-context = { module = "io.opentelemetry:opentelemetry-context", version.ref = "opentelemetry" }
opentelemetry-context = { module = "io.opentelemetry:opentelemetry-context" }
opentelemetry-exporter-logging = { module = "io.opentelemetry:opentelemetry-exporter-logging" }
opentelemetry-diskBuffering = { module = "io.opentelemetry.contrib:opentelemetry-disk-buffering", version.ref = "opentelemetry-contrib" }
opentelemetry-exporter-otlp = { module = "io.opentelemetry:opentelemetry-exporter-otlp", version.ref = "opentelemetry" }
opentelemetry-exporter-otlp = { module = "io.opentelemetry:opentelemetry-exporter-otlp" }
volley = "com.android.volley:volley:1.2.1"
auto-service-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService" }
auto-service-processor = { module = "com.google.auto.service:auto-service", version.ref = "autoService" }

#Test tools
opentelemetry-sdk-testing = { module = "io.opentelemetry:opentelemetry-sdk-testing", version.ref = "opentelemetry" }
opentelemetry-sdk-testing = { module = "io.opentelemetry:opentelemetry-sdk-testing" }
androidx-test-core = "androidx.test:core:1.6.1"
androidx-test-rules = "androidx.test:rules:1.6.1"
androidx-test-runner = "androidx.test:runner:1.6.2"
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/activity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
}

dependencies {
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
api(project(":instrumentation:common-api"))
api(project(":core"))
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/anr/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
}

dependencies {
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
api(project(":core"))
implementation(libs.androidx.core)
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/common-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {

dependencies {
api(project(":core"))
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
implementation(libs.androidx.navigation.fragment)
implementation(libs.opentelemetry.sdk)
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/crash/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
}

dependencies {
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
api(project(":core"))
implementation(libs.androidx.core)
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/fragment/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
}

dependencies {
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
api(project(":instrumentation:common-api"))
api(project(":core"))
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/httpurlconnection/library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
}

dependencies {
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
api(libs.opentelemetry.context)
api(project(":core"))
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/network/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
}

dependencies {
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
api(project(":core"))
api(project(":instrumentation:common-api"))
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/slowrendering/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
}

dependencies {
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
api(project(":core"))
api(project(":instrumentation:common-api"))
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/startup/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
}

dependencies {
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)
api(project(":core"))
implementation(libs.androidx.core)
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/volley/library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies {
implementation(libs.opentelemetry.semconv.incubating)
compileOnly(libs.volley)

api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.api)

testImplementation(libs.volley)
Expand Down
2 changes: 1 addition & 1 deletion test-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {

dependencies {
api(project(":core"))
api(platform(libs.opentelemetry.platform))
api(platform(libs.opentelemetry.platform.alpha))
api(libs.opentelemetry.sdk)
api(libs.opentelemetry.api)
api(libs.opentelemetry.sdk.testing)
Expand Down

0 comments on commit 536db5f

Please sign in to comment.