plugins { java `maven-publish` } extensions.configure { repositories { maven { credentials(PasswordCredentials::class.java) name = "paper" val base = "https://repo.papermc.io/repository/maven" val releasesRepoUrl = "$base-releases/" val snapshotsRepoUrl = "$base-snapshots/" setUrl(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl) } } publications { create("maven") { from(components["java"]) pom { name.set("Velocity") description.set("The modern, next-generation Minecraft server proxy") url.set("https://papermc.io/software/velocity") 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") } } } } }