mana-kotlin-event-sync/build.gradle.kts
Till JS 037a3b530f 0.8.0: 402-Handling (kein aktives Cloud-Sync-Abo)
EventSyncError.SubscriptionRequired (402-Mapping in SyncHttpClient),
onSyncRequired-Hook + isSyncRequired(). Push/Pull: Events bleiben in der
Outbox (kein Verlust, kein Attempt-Increment), event-getriggerte
Push/Pull unterdrückt, Poll prüft weiter (force) → Auto-Recovery.
Wire-Parität zu @mana/event-sync 0.9.0 / mana-swift-event-sync 0.9.0.
gradle test grün (inkl. neuer 402-Test).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 15:31:41 +02:00

69 lines
1.6 KiB
Kotlin

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.serialization)
`java-library`
`maven-publish`
}
group = "ev.mana"
version = "0.8.0"
dependencies {
api(libs.mana.kotlin.core)
api(libs.kotlinx.coroutines.core)
api(libs.kotlinx.serialization.json)
api(libs.kotlinx.datetime)
api(libs.ktor.client.core)
// KtorSyncWebSocket: OkHttp-Engine + WebSockets-Plugin (alle JVM/Android-Consumer).
api(libs.ktor.client.okhttp)
api(libs.ktor.client.websockets)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.ktor.client.mock)
testImplementation(libs.junit.jupiter)
testRuntimeOnly(libs.junit.platform.launcher)
}
// Wie mana-kotlin-core: 17er-Bytecode, kein jvmToolchain (baut mit der
// laufenden Android-Studio-JBR).
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
tasks.test {
useJUnitPlatform()
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
artifactId = "mana-kotlin-event-sync"
}
}
repositories {
maven {
name = "Forgejo"
val forgejoUrl = (findProperty("forgejoPackagesUrl") as String?)
?: "https://git.mana.how/api/packages/till/maven"
url = uri(forgejoUrl)
credentials(HttpHeaderCredentials::class) {
name = "Authorization"
value = "token ${(findProperty("forgejoToken") as String?) ?: System.getenv("FORGEJO_TOKEN") ?: ""}"
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
}
}