build: 添加 maven 上传配置
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
|
id("maven-publish")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "cn.hamster3.mc.plugin"
|
group = "cn.hamster3.mc.plugin"
|
||||||
@@ -45,4 +46,22 @@ tasks {
|
|||||||
jar {
|
jar {
|
||||||
destinationDirectory = rootProject.layout.buildDirectory
|
destinationDirectory = rootProject.layout.buildDirectory
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user