From 0e09422b6e9c41d0dc335d1b2bb0fd290b075ef9 Mon Sep 17 00:00:00 2001 From: RTAkland Date: Sun, 30 Aug 2026 22:17:17 +0800 Subject: [PATCH] Apply maven publish plugin --- build.gradle.kts | 20 +++++++++++++++++++- gradle.properties | 4 +++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f2f1ceb..f4ebe39 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,13 +1,31 @@ plugins { kotlin("multiplatform") version "2.4.10" apply false kotlin("plugin.serialization") version "2.4.10" apply false + id("maven-publish") } +val libVersion = providers.gradleProperty("libVersion").get() + allprojects { group = "cn.rtast.bldm" - version = "1.0-SNAPSHOT" + version = libVersion repositories { mavenCentral() } +} + +subprojects { + pluginManager.apply("maven-publish") + + publishing { + repositories { + maven("https://repo.maven.rtast.cn/snapshots") { + credentials { + username = "RTAkland" + password = System.getenv("PUBLISH_TOKEN") + } + } + } + } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index b89b623..ed1edd3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,5 @@ kotlin.code.style=official org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=1024m -XX:+HeapDumpOnOutOfMemoryError -kotlin.native.ignoreDisabledTargets=true \ No newline at end of file +kotlin.native.ignoreDisabledTargets=true + +libVersion=0.1-snapshots \ No newline at end of file