CryptoContext + optionale suspend-context-Varianten (Default → sync-Basis → bestehende Provider+Tests unverändert); ScopeVaultClient (Ktor, 404/410); ScopedCryptoProvider (delegiert pro Scope an MasterKeyCryptoProvider mit Sub-Key, Mutex-Cache, Master-Fallback, shredded→wirft); createScopedKeyProviderFromVault; EventSyncConfig.scopeResolver → Factory baut Scoped-Provider, Context an emit/pull/reencrypt. Parität zu @mana/event-sync 0.7.0 + mana-swift-event-sync 0.6.0. Build + Tests grün, abwärtskompatibel. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
69 lines
1.6 KiB
Kotlin
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.5.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")
|
|
}
|
|
}
|
|
}
|
|
}
|