mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
Reverts the Kover coverage aggregation (introduced indca345212b) from every module, the root aggregation block, the Sonar coverage import, the version catalog, and BUILDING.md. With the plugin present the 16 GB CI runner OOM-killed during the Android test+build job even with Kover opt-in disabled; removing it entirely clears the OOM. No other CI changes — the diff versus main is exactly the inverse ofdca345212b. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
138 lines
4.5 KiB
Kotlin
138 lines
4.5 KiB
Kotlin
/*
|
|
* Copyright (c) 2025 Vitor Pamplona
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
* this software and associated documentation files (the "Software"), to deal in
|
|
* the Software without restriction, including without limitation the rights to use,
|
|
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
* Software, and to permit persons to whom the Software is furnished to do so,
|
|
* subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlinMultiplatform)
|
|
alias(libs.plugins.androidKotlinMultiplatformLibrary)
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
freeCompilerArgs.add("-Xexpect-actual-classes")
|
|
}
|
|
jvm {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_21)
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "com.vitorpamplona.quic"
|
|
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"))
|
|
}
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Run the live-interop runner against a real QUIC server. Configure target
|
|
* via -PinteropHost=… -PinteropPort=… -PinteropTimeoutSec=…
|
|
*
|
|
* Usage:
|
|
* ./gradlew :quic:interop -PinteropHost=127.0.0.1 -PinteropPort=4433
|
|
*/
|
|
tasks.register<JavaExec>("interop") {
|
|
group = "verification"
|
|
description = "Drive QuicConnection against a real QUIC server (default 127.0.0.1:4433)."
|
|
dependsOn("jvmTestClasses", "jvmJar")
|
|
classpath =
|
|
files(
|
|
tasks.named("jvmJar"),
|
|
configurations.named("jvmTestRuntimeClasspath"),
|
|
layout.buildDirectory.dir("classes/kotlin/jvm/test"),
|
|
)
|
|
mainClass.set("com.vitorpamplona.quic.interop.InteropRunnerKt")
|
|
val host = (project.findProperty("interopHost") as? String) ?: "127.0.0.1"
|
|
val port = (project.findProperty("interopPort") as? String) ?: "4433"
|
|
val timeoutSec = (project.findProperty("interopTimeoutSec") as? String) ?: "10"
|
|
args(host, port)
|
|
systemProperty("interopTimeoutSec", timeoutSec)
|
|
}
|
|
|
|
// Long-form audio-rooms soak test. Disabled by default — `./gradlew test`
|
|
// must stay fast for CI. Opt in with `-PquicSoakSeconds=N` (e.g. 1800 for
|
|
// the 30-minute run from the soak prompt). Without the property the test
|
|
// class checks for null and skips via `Assume.assumeTrue`.
|
|
tasks.withType<Test>().configureEach {
|
|
val soakSeconds = (project.findProperty("quicSoakSeconds") as? String)
|
|
if (soakSeconds != null) {
|
|
systemProperty("quicSoakSeconds", soakSeconds)
|
|
}
|
|
}
|