Files
amethyst/.claude/skills/quartz-integration/references/gradle-setup.md
T
Vitor PamplonaandClaude Opus 5 43f0fcf038 chore(release): bump to 1.14.0
app 1.13.1 -> 1.14.0, appCode 456 -> 457. That single edit drives Android's
versionName/versionCode, Desktop and CLI packageVersion, quartz's Maven
version and geode's RelayInfo.VERSION. RELEASE_NOTES_ID is repointed, which
RELEASE_OPS notes happens on x.y.0 releases and not on patches.

Also syncs the docs that state a version rather than illustrate one. quartz
and geode both read libs.versions.app, so their install snippets were stale
claims about what Maven Central and the release assets actually carry:

- README.md, quartz-integration SKILL.md and its gradle-setup.md reference
  -> quartz 1.14.0
- geode/README.md install commands -> geode 1.14.0

The Homebrew/Winget "not bootstrapped" notes in RELEASE_OPS.md and
BUILDING.md were stamped v1.13.1. Re-verified before moving the stamp rather
than re-stamping blind: Homebrew/homebrew-cask has no amethyst-nostr.rb and
microsoft/winget-pkgs has no VitorPamplona/Amethyst, both still 404, so the
claim holds. The bump-script invocations beside them named v1.13.2, a tag
that never existed, and are now copy-pasteable.

Left alone deliberately: everything under */packaging/ and translators.json's
tag, which the bump workflows and the Crowdin job write after the tag exists
(bumping by hand would commit wrong hashes and a dead URL); BUILDING.md's
asset-name and git-checkout samples, which are illustrations; and the
"invisible until v1.13.1" line in RELEASE_OPS.md, which is history.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gs2gi3sZfQ7SHrVm2njLMw
2026-08-22 13:04:02 -04:00

3.3 KiB

Quartz Gradle Dependency Setup

Current version

com.vitorpamplona.quartz:quartz:1.14.0

Check latest: https://central.sonatype.com/artifact/com.vitorpamplona.quartz/quartz


KMP Project Setup

gradle/libs.versions.toml

[versions]
quartz = "1.14.0"

[libraries]
quartz = { module = "com.vitorpamplona.quartz:quartz", version.ref = "quartz" }

build.gradle.kts (library/app module)

plugins {
    alias(libs.plugins.kotlinMultiplatform)
    alias(libs.plugins.androidKotlinMultiplatformLibrary) // or androidLibrary/androidApplication
}

kotlin {
    jvm()
    androidLibrary {
        namespace = "com.example.myapp"
        compileSdk = 35
        minSdk = 21
    }
    // optional: iOS targets

    sourceSets {
        commonMain.dependencies {
            implementation(libs.quartz)
        }
        // No platform-specific deps needed — Quartz provides them transitively
    }
}

Android-only Project

// build.gradle.kts (app module)
dependencies {
    implementation("com.vitorpamplona.quartz:quartz:1.14.0")
}

JVM (Desktop) standalone

// build.gradle.kts
plugins {
    kotlin("jvm")
}

dependencies {
    implementation("com.vitorpamplona.quartz:quartz:1.14.0")
    // JNA needed for libsodium (NIP-44) on JVM
    implementation("net.java.dev.jna:jna:5.18.1")
}

Transitive Dependencies (what you get automatically)

All platforms (commonMain)

  • org.jetbrains.kotlin:kotlin-stdlib
  • org.jetbrains.kotlinx:kotlinx-coroutines-core
  • org.jetbrains.kotlinx:kotlinx-collections-immutable
  • org.jetbrains.kotlinx:kotlinx-serialization-json
  • androidx.collection:collection (LruCache)
  • androidx.compose.runtime:runtime-annotation (@Immutable/@Stable)
  • fr.acinq.secp256k1:secp256k1-kmp (Schnorr crypto — common)

JVM + Android (jvmAndroid)

  • com.github.anthonynsimon:rfc3986-normalizer (URL normalization)
  • com.fasterxml.jackson.module:jackson-module-kotlin (JSON)
  • com.squareup.okhttp3:okhttp (WebSocket)
  • ru.gildor.coroutines:kotlin-coroutines-okhttp
  • nl.bommber:kchesslib (NIP-64 chess, version pinned to 1.0.0)

JVM only

  • fr.acinq.secp256k1:secp256k1-kmp-jni-jvm
  • com.goterl:lazysodium-java (NIP-44 encryption)
  • net.java.dev.jna:jna

Android only

  • fr.acinq.secp256k1:secp256k1-kmp-jni-android
  • com.goterl:lazysodium-android
  • net.java.dev.jna:jna (aar)
  • androidx.core:core-ktx

Packaging / ProGuard

Quartz ships consumer ProGuard rules automatically (publish = true in the library). You don't need to add manual keep rules for Quartz classes in your app.

For Android release builds, these classes are preserved:

  • All com.vitorpamplona.quartz.** event and model classes
  • Jackson serialization annotations

Common Build Errors

Duplicate class kotlin.collections.jdk8

Add to gradle.properties:

android.useFullClasspathForDexingTransform=true

Could not find lazysodium-java on JVM

Ensure JNA is on the classpath:

implementation("net.java.dev.jna:jna:5.18.1")

iOS: Framework not found quartz-kmpKit

Build the XCFramework first:

./gradlew :quartz:assembleQuartz-kmpKitReleaseXCFramework

Then drag quartz/build/XCFrameworks/release/quartz-kmpKit.xcframework into Xcode.