From 22e0fe3ede647074a108b82d0b62c1a19730d47e Mon Sep 17 00:00:00 2001 From: RTAkland Date: Mon, 29 Sep 2025 01:56:32 +0800 Subject: [PATCH] Add publishing config --- build.gradle.kts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b276726..f3dfe56 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,9 +1,12 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { kotlin("multiplatform") version "2.2.10" + id("maven-publish") } group = "cn.rtast.nmdns" -version = "1.0-SNAPSHOT" +version = "0.0.1" repositories { mavenCentral() @@ -14,7 +17,7 @@ kotlin { linuxX64() mingwX64() macosArm64() - jvm() + jvm { compilerOptions { jvmTarget = JvmTarget.JVM_11 } } sourceSets { commonMain.dependencies { @@ -26,3 +29,16 @@ kotlin { } } } + +publishing { + repositories { + mavenLocal() + maven("https://repo.maven.rtast.cn/releases") { + name = "RTAST" + credentials { + username = "RTAkland" + password = System.getenv("PUBLISH_TOKEN") + } + } + } +}