From 21000057068e0eb75a5772c89abc6cd7ba143ea7 Mon Sep 17 00:00:00 2001 From: MiniDay <372403923@qq.com> Date: Sat, 6 Jul 2024 14:29:18 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E6=B7=BB=E5=8A=A0=20maven=20=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 4a66196..a285922 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,7 @@ plugins { id("java") + id("maven-publish") } group = "cn.hamster3.mc.plugin" @@ -45,4 +46,22 @@ tasks { jar { destinationDirectory = rootProject.layout.buildDirectory } +} + +publishing { + publications { + create("mavenJava") { + from(components["java"]) + } + } + repositories { + maven { + url = uri("https://maven.airgame.net/public/") + + credentials { + username = rootProject.properties.getOrDefault("maven_username", "").toString() + password = rootProject.properties.getOrDefault("maven_password", "").toString() + } + } + } } \ No newline at end of file