From 547eec06aba01e94f2e9fa21e9db0495a181e65b Mon Sep 17 00:00:00 2001 From: Matt King Date: Sat, 3 Aug 2024 15:01:08 +0100 Subject: [PATCH] Move publishing block inside mavenPublishing --- build.gradle.kts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ed458ca..80b0827 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,3 @@ -import com.vanniktech.maven.publish.SonatypeHost - plugins { kotlin("jvm") version "1.9.23" id("maven-publish") @@ -27,19 +25,18 @@ tasks.test { } -publishing { - repositories { - maven("https://maven.pkg.github.com/sainsburys-tech/k2zpl") { - name = "GitHubPackages" - credentials { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") +mavenPublishing { + publishing { + repositories { + maven("https://maven.pkg.github.com/sainsburys-tech/k2zpl") { + name = "GitHubPackages" + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } } } } -} -mavenPublishing { - publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) signAllPublications() coordinates("com.sainsburys.k2zpl", "k2zpl", "0.1.0") pom { @@ -66,4 +63,4 @@ mavenPublishing { developerConnection.set("scm:git:ssh://git@github.com/sainsburys-tech/k2zpl.git") } } -} \ No newline at end of file +}