From 1fa8c6da146a0431e8f14e856ba2246e8bc056b7 Mon Sep 17 00:00:00 2001 From: Matt King Date: Thu, 27 Jun 2024 18:02:54 +0100 Subject: [PATCH] Update build to add maven central publishing plugin --- build.gradle.kts | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index bf0858d..65798a1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,11 +1,14 @@ +import com.vanniktech.maven.publish.SonatypeHost + plugins { kotlin("jvm") version "1.9.23" id("maven-publish") id("signing") + id("com.vanniktech.maven.publish") version "0.29.0" } -group = "info.mking" -version = "1.0-SNAPSHOT" +group = "info.mking.k2zpl" +version = "0.1" repositories { mavenCentral() @@ -17,4 +20,35 @@ dependencies { tasks.test { useJUnitPlatform() +} + +mavenPublishing { + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) + signAllPublications() + coordinates("info.mking.k2zpl", "k2zpl", "0.0.1") + pom { + name.set("k2zpl") + description.set("Kotlin DSL for ZPL (Zebra Programming Language)") + inceptionYear.set("2024") + url.set("https://github.com/itsmattking/k2zpl/") + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + developers { + developer { + id.set("itsmattking") + name.set("Matt King") + url.set("https://github.com/itsmattking/") + } + } + scm { + url.set("https://github.com/itsmattking/k2zpl/") + connection.set("scm:git:git://github.com/itsmattking/k2zpl.git") + developerConnection.set("scm:git:ssh://git@github.com/itsmattking/k2zpl.git") + } + } } \ No newline at end of file