Files
libmc/build.gradle.kts
T

38 lines
991 B
Kotlin
Raw 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-07 10:07:10 +08:00
"protocol" -> getProperty("protocolVersion")
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")
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()