Migrate buildSrc plugins to build-logic
This commit is contained in:
committed by
Andrew Steinborn
parent
7e932eaad4
commit
3d20c3dd2d
33
build-logic/src/main/kotlin/velocity-publish.gradle.kts
Normal file
33
build-logic/src/main/kotlin/velocity-publish.gradle.kts
Normal file
@@ -0,0 +1,33 @@
|
||||
plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
extensions.configure<PublishingExtension> {
|
||||
repositories {
|
||||
maven {
|
||||
credentials(PasswordCredentials::class.java)
|
||||
|
||||
name = "paper"
|
||||
val base = "https://papermc.io/repo/repository/maven"
|
||||
val releasesRepoUrl = "$base-releases/"
|
||||
val snapshotsRepoUrl = "$base-snapshots/"
|
||||
setUrl(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
|
||||
}
|
||||
}
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
pom {
|
||||
name.set("Velocity")
|
||||
description.set("The modern, next-generation Minecraft server proxy")
|
||||
url.set("https://www.velocitypowered.com")
|
||||
scm {
|
||||
url.set("https://github.com/PaperMC/Velocity")
|
||||
connection.set("scm:git:https://github.com/PaperMC/Velocity.git")
|
||||
developerConnection.set("scm:git:https://github.com/PaperMC/Velocity.git")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user