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>
90 lines
2.1 KiB
Kotlin
90 lines
2.1 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.1.0"
|
|
|
|
android {
|
|
namespace = "ev.mana.widget"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
minSdk = 24
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
|
|
// Wie mana-kotlin-tokens: nur die release-Variante als Maven-Artefakt,
|
|
// inkl. Sources-Jar für Doc-Navigation in den App-Modulen.
|
|
publishing {
|
|
singleVariant("release") {
|
|
withSourcesJar()
|
|
}
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_17)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
val composeBom = platform(libs.compose.bom)
|
|
api(composeBom)
|
|
|
|
// `api`, weil Widget-Code der Konsumenten Color/Composable transitiv nutzt.
|
|
api(libs.compose.runtime)
|
|
api(libs.compose.ui.graphics)
|
|
api(libs.compose.material3)
|
|
|
|
// Glance ist die Kern-Abhängigkeit dieser Lib — `api`, damit Apps
|
|
// GlanceAppWidget/GlanceTheme direkt aus diesem Artefakt bekommen.
|
|
api(libs.glance.appwidget)
|
|
api(libs.glance.material3)
|
|
|
|
// Tokens `api`: ManaTheme/ManaPalette tauchen in der öffentlichen
|
|
// Bridge-Signatur auf (ManaTheme.toGlanceColors / ManaGlanceTheme).
|
|
api(libs.mana.tokens)
|
|
}
|
|
|
|
// Publishing wie mana-kotlin-tokens/-core: Forgejo-Maven, Credentials via
|
|
// Property/Env — der normale Build (assembleRelease) läuft ohne Secrets.
|
|
afterEvaluate {
|
|
publishing {
|
|
publications {
|
|
create<MavenPublication>("release") {
|
|
from(components["release"])
|
|
artifactId = "mana-kotlin-widget"
|
|
}
|
|
}
|
|
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")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|