From a6a1ed41023a0faeb22c059ea7064860340517e7 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Mon, 9 Dec 2024 09:47:28 +0300 Subject: [PATCH] Migrate to new central publish --- build.gradle.kts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 42c41cc..6e3f9e0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ + plugins { `java-gradle-plugin` `kotlin-dsl` @@ -112,8 +113,18 @@ val emptySourcesJar by tasks.creating(Jar::class) { archiveBaseName.set("empty") } - mavenPublishing { + configure( + com.vanniktech.maven.publish.GradlePlugin( + javadocJar = com.vanniktech.maven.publish.JavadocJar.Dokka("dokkaHtml"), + sourcesJar = true, + ) + ) + + project.publishing.publications.create("maven", MavenPublication::class.java) { + from(project.components.getByName("versionCatalog")) + } + val vcs = "https://git.sciprog.center/kscience/gradle-tools" pom { @@ -167,8 +178,6 @@ mavenPublishing { publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.CENTRAL_PORTAL) signAllPublications() } - - configure(com.vanniktech.maven.publish.VersionCatalog()) } kotlin {