From 907813063907f76a48b3c1c322be51a48f16a40f Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Thu, 6 Mar 2025 17:26:26 -0500 Subject: [PATCH 1/4] bump oshi version --- instrumentation/oshi/library/build.gradle.kts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/instrumentation/oshi/library/build.gradle.kts b/instrumentation/oshi/library/build.gradle.kts index 1535c97d8376..4651153a801e 100644 --- a/instrumentation/oshi/library/build.gradle.kts +++ b/instrumentation/oshi/library/build.gradle.kts @@ -3,11 +3,9 @@ plugins { id("com.google.osdetector") } -// 5.5.0 is the first version that works on arm mac -val oshiVersion = if (osdetector.os == "osx" && osdetector.arch == "aarch_64") "5.5.0" else "5.3.1" - dependencies { - library("com.github.oshi:oshi-core:$oshiVersion") + // 5.5.0 is the first version that works on arm mac + library("com.github.oshi:oshi-core:5.5.0") testImplementation(project(":instrumentation:oshi:testing")) } From dd59c6bc4010a748251d9afdd0cbad419d0e448b Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Thu, 6 Mar 2025 18:23:04 -0500 Subject: [PATCH 2/4] bump muzzle too --- instrumentation/oshi/javaagent/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/oshi/javaagent/build.gradle.kts b/instrumentation/oshi/javaagent/build.gradle.kts index c92fd36aa4fe..03ad2415af29 100644 --- a/instrumentation/oshi/javaagent/build.gradle.kts +++ b/instrumentation/oshi/javaagent/build.gradle.kts @@ -6,7 +6,7 @@ muzzle { pass { group.set("com.github.oshi") module.set("oshi-core") - versions.set("[5.3.1,)") + versions.set("[5.5.0,)") // Could not parse POM https://repo.maven.apache.org/maven2/com/github/oshi/oshi-core/6.1.1/oshi-core-6.1.1.pom skip("6.1.1") } @@ -17,7 +17,7 @@ dependencies { compileOnly("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure") - library("com.github.oshi:oshi-core:5.3.1") + library("com.github.oshi:oshi-core:5.5.0") testImplementation(project(":instrumentation:oshi:testing")) } From e3c78e0b787c641b1fa4ae53907beb51764f98c5 Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Fri, 7 Mar 2025 06:04:30 -0500 Subject: [PATCH 3/4] only conditionally update oshi for test classpath for arm mac --- instrumentation/oshi/javaagent/build.gradle.kts | 4 ++-- instrumentation/oshi/library/build.gradle.kts | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/instrumentation/oshi/javaagent/build.gradle.kts b/instrumentation/oshi/javaagent/build.gradle.kts index 03ad2415af29..c92fd36aa4fe 100644 --- a/instrumentation/oshi/javaagent/build.gradle.kts +++ b/instrumentation/oshi/javaagent/build.gradle.kts @@ -6,7 +6,7 @@ muzzle { pass { group.set("com.github.oshi") module.set("oshi-core") - versions.set("[5.5.0,)") + versions.set("[5.3.1,)") // Could not parse POM https://repo.maven.apache.org/maven2/com/github/oshi/oshi-core/6.1.1/oshi-core-6.1.1.pom skip("6.1.1") } @@ -17,7 +17,7 @@ dependencies { compileOnly("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure") - library("com.github.oshi:oshi-core:5.5.0") + library("com.github.oshi:oshi-core:5.3.1") testImplementation(project(":instrumentation:oshi:testing")) } diff --git a/instrumentation/oshi/library/build.gradle.kts b/instrumentation/oshi/library/build.gradle.kts index 4651153a801e..d07079355fbe 100644 --- a/instrumentation/oshi/library/build.gradle.kts +++ b/instrumentation/oshi/library/build.gradle.kts @@ -4,8 +4,12 @@ plugins { } dependencies { - // 5.5.0 is the first version that works on arm mac - library("com.github.oshi:oshi-core:5.5.0") + library("com.github.oshi:oshi-core:5.3.1") + + if (osdetector.os == "osx" && osdetector.arch == "aarch_64" && !(findProperty("testLatestDeps") as Boolean)) { + // 5.5.0 is the first version that works on arm mac + configurations.testRuntimeClasspath.get().resolutionStrategy.force("com.github.oshi:oshi-core:5.5.0") + } testImplementation(project(":instrumentation:oshi:testing")) } From 554d574c0decadc4af342ab27fc019d93d914a12 Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Fri, 7 Mar 2025 07:11:16 -0500 Subject: [PATCH 4/4] move config overrides outside dependency block --- instrumentation/oshi/library/build.gradle.kts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/instrumentation/oshi/library/build.gradle.kts b/instrumentation/oshi/library/build.gradle.kts index d07079355fbe..a719af599f8d 100644 --- a/instrumentation/oshi/library/build.gradle.kts +++ b/instrumentation/oshi/library/build.gradle.kts @@ -6,10 +6,10 @@ plugins { dependencies { library("com.github.oshi:oshi-core:5.3.1") - if (osdetector.os == "osx" && osdetector.arch == "aarch_64" && !(findProperty("testLatestDeps") as Boolean)) { - // 5.5.0 is the first version that works on arm mac - configurations.testRuntimeClasspath.get().resolutionStrategy.force("com.github.oshi:oshi-core:5.5.0") - } - testImplementation(project(":instrumentation:oshi:testing")) } + +if (osdetector.os == "osx" && osdetector.arch == "aarch_64" && !(findProperty("testLatestDeps") as Boolean)) { + // 5.5.0 is the first version that works on arm mac + configurations.testRuntimeClasspath.get().resolutionStrategy.force("com.github.oshi:oshi-core:5.5.0") +}