mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-30 07:37:38 +00:00
The pure-Kotlin QUIC v1 + HTTP/3 + WebTransport stack and its interop runner moved to vitorpamplona/quic-kmp, which publishes it to Maven Central as com.vitorpamplona.quic:quic. nestsClient, marmotQuic, cli, desktopApp and amethyst now depend on libs.quic (0.1.0). quic-kmp depends on the published quartz. The root build substitutes that module with this checkout's :quartz, so the app keeps a single quartz and QUIC runs against the in-tree one. To work on QUIC next to a consumer, -PquicKmpDir=../quic-kmp builds a local checkout through an included build instead of the Maven artifact. The :quic jvmTest step leaves CI and the pre-push hook, and the docs, plans index, PR template and kotlin-multiplatform skill point at the new repo. Needs com.vitorpamplona.quic:quic:0.1.0 on Maven Central before it builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rz1noti5QAzSJF9sBdDSX
89 lines
2.4 KiB
Kotlin
89 lines
2.4 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(project(":quartz"))
|
|
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) }
|
|
}
|