diff --git a/instrumentation/oshi/library/build.gradle.kts b/instrumentation/oshi/library/build.gradle.kts index 1535c97d8376..a719af599f8d 100644 --- a/instrumentation/oshi/library/build.gradle.kts +++ b/instrumentation/oshi/library/build.gradle.kts @@ -3,11 +3,13 @@ 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") + library("com.github.oshi:oshi-core:5.3.1") 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") +}