Skip to content

Commit 2849844

Browse files
authored
Change oshi test library logic for arm mac (#13465)
1 parent e521e6c commit 2849844

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

instrumentation/oshi/library/build.gradle.kts

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ plugins {
33
id("com.google.osdetector")
44
}
55

6-
// 5.5.0 is the first version that works on arm mac
7-
val oshiVersion = if (osdetector.os == "osx" && osdetector.arch == "aarch_64") "5.5.0" else "5.3.1"
8-
96
dependencies {
10-
library("com.github.oshi:oshi-core:$oshiVersion")
7+
library("com.github.oshi:oshi-core:5.3.1")
118

129
testImplementation(project(":instrumentation:oshi:testing"))
1310
}
11+
12+
if (osdetector.os == "osx" && osdetector.arch == "aarch_64" && !(findProperty("testLatestDeps") as Boolean)) {
13+
// 5.5.0 is the first version that works on arm mac
14+
configurations.testRuntimeClasspath.get().resolutionStrategy.force("com.github.oshi:oshi-core:5.5.0")
15+
}

0 commit comments

Comments
 (0)