Files
amethyst/marmotQuic/build.gradle.kts
T
Vitor PamplonaandClaude Opus 5.5 6130766bcb refactor: take Marmot and cordn from marmot-kmp and cordn-kmp
The MLS bindings left quartz (3.0.0) for their own libraries, and their headless group clients
went with them, so commons now depends on libs.marmot and libs.cordn.

- Imports move from com.vitorpamplona.quartz.marmot/cordn to com.vitorpamplona.marmot/cordn, and
  from commons.marmot/cordn to marmot.client/cordn.client for the classes that moved
  (MarmotManager, MarmotSyncPolicy, MarmotPushCoordinator, ..., CordnGroupManager,
  CordnKeyPackages, CordnSyncLoop, CordnCoordinatorRegistry, ...).
- What stays is the app: the encrypted stores, the chatrooms and lists, the relay-pool adapter,
  CordnLinks (split out of CordnCoordinatorLink.kt), the file stores and migrations, the UI.
- MarmotManager.syncMetadataTo becomes an extension next to MarmotGroupChatroom, with its own
  test; the cordn-vs-Marmot tests from quartz live here now, the one place with both.
- Marmot's kinds register with quartz's EventFactory from EventCache, the Android Application and
  amy's main. GiftWrapDecryptor is gone: quartz's GiftWrapEvent.unwrapAndUnsealOrNull replaces it.
- Builds against unreleased quartz 3.0.0, marmot 1.0.0 and cordn 1.0.0: until they publish, pass
  -PquartzDir=../quartz -PmarmotKmpDir=../marmot-kmp -PcordnKmpDir=../cordn-kmp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ts63GVTwvmPjvikAdWihn
2026-10-23 16:28:21 +00:00

91 lines
2.5 KiB
Kotlin

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidKotlinMultiplatformLibrary)
}
kotlin {
jvm {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}
android {
namespace = "com.vitorpamplona.marmotquic"
compileSdk =
libs.versions.android.compileSdk
.get()
.toInt()
minSdk =
libs.versions.android.minSdk
.get()
.toInt()
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
withHostTest {}
}
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlin.stdlib)
implementation(libs.kotlinx.coroutines.core)
api(libs.quartz)
// The agent text stream transport this module implements.
api(libs.marmot)
implementation(libs.quic)
}
}
commonTest {
dependencies {
implementation(libs.kotlin.test)
implementation(libs.kotlinx.coroutines.test)
}
}
val jvmAndroid =
create("jvmAndroid") {
dependsOn(commonMain.get())
}
jvmMain {
dependsOn(jvmAndroid)
}
androidMain {
dependsOn(jvmAndroid)
}
jvmTest {
dependencies {
implementation(libs.kotlin.test)
implementation(libs.kotlinx.coroutines.test)
implementation(libs.secp256k1.kmp.jni.jvm)
}
}
getByName("androidHostTest") {
dependencies {
implementation(libs.kotlin.test)
implementation(libs.kotlinx.coroutines.test)
implementation(libs.secp256k1.kmp.jni.jvm)
}
}
}
}
// Forward the interop opt-ins from the Gradle JVM to the test workers.
// Without this, `-DmarmotQuicBroker=...` / `-DmarmotWn=...` never reach the
// tests and every interop case silently skips. Mirrors `:nestsClient`.
tasks.withType<Test>().configureEach {
System.getProperty("marmotQuicBroker")?.let { systemProperty("marmotQuicBroker", it) }
System.getProperty("marmotQuicBrokerPin")?.let { systemProperty("marmotQuicBrokerPin", it) }
System.getProperty("marmotWn")?.let { systemProperty("marmotWn", it) }
}