mana-kotlin-tokens/build.gradle.kts
Till JS 627eed4e4c build: Maven-Registry till/maven -> mana/maven (Namespace-Vereinheitlichung)
Kotlin-Libs liegen jetzt in der Verein-Package-Registry git.mana.how/api/packages/mana/maven
(alle 10 Libs / 50 Versionen registry-zu-registry kopiert). Consumer- und
Publisher-URLs nachgezogen.

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

88 lines
2 KiB
Kotlin

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
`maven-publish`
}
group = "ev.mana"
version = "0.3.0"
android {
namespace = "ev.mana.tokens"
compileSdk = 36
defaultConfig {
minSdk = 24
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildFeatures {
compose = true
}
// Publiziert genau die `release`-Variante als Maven-Artefakt, inkl.
// Sources-Jar — Konsumenten (App-Module) bekommen Doc-Quellen.
publishing {
singleVariant("release") {
withSourcesJar()
}
}
}
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
dependencies {
// Compose über die BOM — Versionen zentral, kompatibel mit den App-
// Modulen (gleiche BOM 2024.12.01 wie wordeck-android & Co.).
val composeBom = platform(libs.compose.bom)
api(composeBom)
// `api`, weil Konsumenten Color/Dp/TextStyle/Modifier transitiv brauchen.
api(libs.compose.foundation)
api(libs.compose.ui)
api(libs.compose.ui.graphics)
api(libs.compose.ui.text)
api(libs.compose.material3)
api(libs.compose.ui.tooling.preview)
debugImplementation(libs.compose.ui.tooling)
}
// Publishing-Block wie in mana-kotlin-core: Forgejo-Maven, Credentials
// via Property/Env, normaler Build läuft ohne Secrets.
afterEvaluate {
publishing {
publications {
create<MavenPublication>("release") {
from(components["release"])
artifactId = "mana-kotlin-tokens"
}
}
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")
}
}
}
}
}