Files
libmc/build.gradle.kts
T

39 lines
1.0 KiB
Kotlin
Raw Permalink Normal View History

2026-09-03 19:32:46 +08:00
plugins {
2026-09-04 16:55:56 +08:00
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.maven.publish)
2026-09-03 19:32:46 +08:00
}
2026-09-04 00:19:17 +08:00
allprojects {
2026-09-04 15:21:22 +08:00
group = "cn.rtast.libmc"
val libVersion = getProperty("libVersion")
version = when (name) {
2026-09-09 01:23:47 +08:00
"protocol" -> getProperty("protocolVersion") + "-" + libVersion
else -> libVersion
}
2026-09-03 19:32:46 +08:00
2026-09-04 00:19:17 +08:00
repositories {
mavenCentral()
2026-09-03 19:32:46 +08:00
}
}
2026-09-04 00:19:17 +08:00
subprojects {
pluginManager.apply("org.jetbrains.kotlin.multiplatform")
pluginManager.apply("maven-publish")
if (project.path.startsWith(":example")) return@subprojects
2026-09-04 00:19:17 +08:00
publishing {
repositories {
maven("https://repo.rtast.cn/packages") {
credentials(HttpHeaderCredentials::class) {
name = "Authorization"
value = "Bearer ${System.getenv("PUBLISH_TOKEN")}"
}
authentication {
create<HttpHeaderAuthentication>("header")
}
2026-09-03 19:32:46 +08:00
}
}
}
}
fun getProperty(name: String): String = providers.gradleProperty(name).get()