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.9.1"
|
|
|
|
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/mana/maven"
|
|
url = uri(forgejoUrl)
|
|
credentials(HttpHeaderCredentials::class) {
|
|
name = "Authorization"
|
|
value = "token ${(findProperty("forgejoToken") as String?) ?: System.getenv("FORGEJO_TOKEN") ?: ""}"
|
|
}
|
|
authentication {
|
|
create<HttpHeaderAuthentication>("header")
|
|
}
|
|
}
|
|
}
|
|
}
|