@@ -4,9 +4,8 @@ plugins {
44 id ' com.diffplug.spotless' version ' 6.25.0'
55 id ' signing'
66 id ' maven-publish'
7- id ' de.marcphilipp.nexus-publish' version ' 0.4.0'
87 id ' net.researchgate.release' version ' 3.0.2'
9- id ' io.codearte. nexus-staging ' version ' 0.22 .0'
8+ id ' io.github.gradle- nexus.publish-plugin ' version ' 1.3 .0'
109}
1110
1211wrapper {
@@ -64,6 +63,7 @@ spotless {
6463}
6564
6665nexusPublishing {
66+ packageGroup = ' org.gitlab4j'
6767 repositories {
6868 sonatype {
6969 nexusUrl. set(uri(" https://oss.sonatype.org/service/local/" ))
@@ -73,13 +73,6 @@ nexusPublishing {
7373 }
7474}
7575
76- nexusStaging {
77- serverUrl = " https://oss.sonatype.org/service/local/"
78- packageGroup = ' org.gitlab4j'
79- username = project. findProperty(' sonatypeUser' ) ?: ' '
80- password = project. findProperty(' sonatypePassword' ) ?: ' '
81- }
82-
8376publishing {
8477 publications {
8578 mavenJava(MavenPublication ) {
@@ -124,7 +117,7 @@ publishing {
124117release {
125118 buildTasks = [' releaseBuild' ]
126119 git {
127- requireBranch. set(' main ' )
120+ requireBranch. set(' 6.x ' )
128121 }
129122}
130123
@@ -152,7 +145,8 @@ def updateLastVersionValueTask = tasks.register('updateLastVersionValue') {
152145 doLast {
153146 def propertiesFile = file(' gradle.properties' )
154147 def content = propertiesFile. text
155- content = content. replaceAll(" lastVersion=[0-9\\ .]+" , " lastVersion=" + version. replace(' -SNAPSHOT' , ' ' ))
148+ def newVersion = project. findProperty(' release.releaseVersion' ) ?: version. replace(' -SNAPSHOT' , ' ' )
149+ content = content. replaceAll(" lastVersion=[0-9a-z\\ .\\ -]+" , " lastVersion=" + newVersion)
156150 propertiesFile. text = content
157151 }
158152}
0 commit comments