From 0547b2125c61054a65e9cbb11ed254cda60b9552 Mon Sep 17 00:00:00 2001 From: Valery Maximov Date: Mon, 18 Dec 2023 14:09:24 +0300 Subject: [PATCH] publish-to-sonatype --- build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index aca38ce4..2bf25a0e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,6 +17,7 @@ plugins { id("me.champeau.gradle.jmh") version "0.5.3" id("io.freefair.maven-central.validate-poms") version "8.4" id("ru.vyarus.pom") version "2.2.2" + id("io.codearte.nexus-staging") version "0.30.0" } repositories { @@ -234,6 +235,10 @@ publishing { publications { create("maven") { from(components["java"]) + if (isSnapshot && project.hasProperty("simplifyVersion")) { + version = findProperty("git.ref.slug") as String + "-SNAPSHOT" + } + pom { description.set("Collection of parsers for Language 1C (BSL) in ANTLR4 format.") url.set("https://github.com/1c-syntax/bsl-parser") @@ -287,3 +292,8 @@ publishing { } } } + +nexusStaging { + serverUrl = "https://s01.oss.sonatype.org/service/local/" + stagingProfileId = "15bd88b4d17915" // ./gradlew getStagingProfile +}