Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions instrumentation/oshi/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand All @@ -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"))
}
Expand Down
6 changes: 2 additions & 4 deletions instrumentation/oshi/library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if your goal is to remove the variable from library declaration then you could also

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"))
}
Loading