From fa0da7fae3a8405f1e9032ccec844427584a77a2 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 11 Apr 2026 00:42:18 +0000 Subject: [PATCH] feat: upgrade negentropy-kmp to v1.0.2, enable macosArm64 target negentropy-kmp v1.0.2 now publishes a macosArm64 artifact, unblocking the macOS native target. Wired macosMain/macosTest source sets through appleMain/appleTest and updated run_all.sh to run the K/Native benchmark on both Linux (linuxX64) and macOS (macosArm64). https://claude.ai/code/session_01WSNE6QKiYM2ZutQD2UihCW --- gradle/libs.versions.toml | 2 +- quartz/benchmarks/run_all.sh | 27 ++++++++++++--------------- quartz/build.gradle.kts | 21 ++++++++++++++++++--- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d1bcc42b7..a1da868ae 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -42,7 +42,7 @@ materialIconsExtended = "1.7.3" media3 = "1.10.0" mockk = "1.14.9" kotlinx-coroutines-test = "1.10.2" -negentropyKmp = "1.0.1" +negentropyKmp = "v1.0.2" netUrlencoderLibVersion = "1.6.0" navigationCompose = "2.9.7" okhttp = "5.3.2" diff --git a/quartz/benchmarks/run_all.sh b/quartz/benchmarks/run_all.sh index 8442f327d..73c69f191 100755 --- a/quartz/benchmarks/run_all.sh +++ b/quartz/benchmarks/run_all.sh @@ -82,25 +82,22 @@ fi echo "" # ============================================================================ -# 2. Kotlin/Native benchmark +# 2. Kotlin/Native benchmark (Linux and macOS) # ============================================================================ -# macosArm64 target is blocked until negentropy-kmp publishes a macosArm64 -# artifact. Once unblocked, add: Darwin) KN_TARGET="macosArm64Test" ;; -if [ "$OS_NAME" = "Linux" ]; then - echo "=== Running Kotlin/Native benchmark ===" - KN_TARGET="linuxX64Test" +echo "=== Running Kotlin/Native benchmark ===" +case "$OS_NAME" in + Linux) KN_TARGET="linuxX64Test" ;; + Darwin) KN_TARGET="macosArm64Test" ;; +esac - "$ROOT/gradlew" -p "$ROOT" ":quartz:$KN_TARGET" --tests "*.Secp256k1NativeBenchmark" \ - 2>/dev/null || true +"$ROOT/gradlew" -p "$ROOT" ":quartz:$KN_TARGET" --tests "*.Secp256k1NativeBenchmark" \ + 2>/dev/null || true - KN_XML="$ROOT/quartz/build/test-results/$KN_TARGET/TEST-${KN_TARGET}.com.vitorpamplona.quartz.utils.secp256k1.Secp256k1NativeBenchmark.xml" - if [ -f "$KN_XML" ]; then - sed -n '//p' "$KN_XML" | grep -v 'CDATA\|]]>' - else - echo "K/Native benchmark XML not found." - fi +KN_XML="$ROOT/quartz/build/test-results/$KN_TARGET/TEST-${KN_TARGET}.com.vitorpamplona.quartz.utils.secp256k1.Secp256k1NativeBenchmark.xml" +if [ -f "$KN_XML" ]; then + sed -n '//p' "$KN_XML" | grep -v 'CDATA\|]]>' else - echo "=== Skipping Kotlin/Native benchmark (only linuxX64 target available) ===" + echo "K/Native benchmark XML not found." fi echo "" diff --git a/quartz/build.gradle.kts b/quartz/build.gradle.kts index 5d7d8ac19..1a852bca8 100644 --- a/quartz/build.gradle.kts +++ b/quartz/build.gradle.kts @@ -87,7 +87,7 @@ kotlin { linuxX64() - // macosArm64() — blocked until negentropy-kmp publishes a macosArm64 artifact + macosArm64() // This makes sure that the resource file directory is visible for iOS tests. val rootDir = "${rootProject.rootDir.path}/quartz/src/commonTest/resources" @@ -299,8 +299,23 @@ kotlin { dependsOn(iosTest.get()) } - // macosMain/macosTest source sets exist but are not wired until - // negentropy-kmp publishes a macosArm64 artifact. + val macosMain = + create("macosMain") { + dependsOn(appleMain) + } + + val macosTest = + create("macosTest") { + dependsOn(appleTest) + } + + val macosArm64Main by getting { + dependsOn(macosMain) + } + + val macosArm64Test by getting { + dependsOn(macosTest) + } val linuxMain = create("linuxMain") {