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