add publishing plugin to gradle

This commit is contained in:
destro174 2021-09-22 20:30:05 +02:00
parent 050da40cac
commit 89549ef12f

View File

@ -1,5 +1,6 @@
plugins { plugins {
java java
`maven-publish`
id("com.github.johnrengelman.shadow") version "7.0.0" id("com.github.johnrengelman.shadow") version "7.0.0"
} }
@ -51,6 +52,23 @@ dependencies {
compileOnly("com.alttd:ShutdownInfo:1.0") compileOnly("com.alttd:ShutdownInfo:1.0")
} }
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories{
maven {
name = "maven"
url = uri("http://leo:8081/")
isAllowInsecureProtocol = true
credentials(PasswordCredentials::class)
}
}
}
tasks { tasks {
shadowJar { shadowJar {