Skip to content

Commit e3c78e0

Browse files
committed
only conditionally update oshi for test classpath for arm mac
1 parent dd59c6b commit e3c78e0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

instrumentation/oshi/javaagent/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ muzzle {
66
pass {
77
group.set("com.github.oshi")
88
module.set("oshi-core")
9-
versions.set("[5.5.0,)")
9+
versions.set("[5.3.1,)")
1010
// Could not parse POM https://repo.maven.apache.org/maven2/com/github/oshi/oshi-core/6.1.1/oshi-core-6.1.1.pom
1111
skip("6.1.1")
1212
}
@@ -17,7 +17,7 @@ dependencies {
1717

1818
compileOnly("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure")
1919

20-
library("com.github.oshi:oshi-core:5.5.0")
20+
library("com.github.oshi:oshi-core:5.3.1")
2121

2222
testImplementation(project(":instrumentation:oshi:testing"))
2323
}

instrumentation/oshi/library/build.gradle.kts

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ plugins {
44
}
55

66
dependencies {
7-
// 5.5.0 is the first version that works on arm mac
8-
library("com.github.oshi:oshi-core:5.5.0")
7+
library("com.github.oshi:oshi-core:5.3.1")
8+
9+
if (osdetector.os == "osx" && osdetector.arch == "aarch_64" && !(findProperty("testLatestDeps") as Boolean)) {
10+
// 5.5.0 is the first version that works on arm mac
11+
configurations.testRuntimeClasspath.get().resolutionStrategy.force("com.github.oshi:oshi-core:5.5.0")
12+
}
913

1014
testImplementation(project(":instrumentation:oshi:testing"))
1115
}

0 commit comments

Comments
 (0)