Skip to content

Commit 1c33ac9

Browse files
author
nKwiatkowski
committed
feat: maven central migration
1 parent e0dc7e7 commit 1c33ac9

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

build.gradle

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
plugins {
2+
id "com.vanniktech.maven.publish" version "0.33.0"
23
id 'java-library'
34
id "idea"
45
id 'jacoco'
56
id "com.adarshr.test-logger" version "4.0.0"
67
id "com.github.johnrengelman.shadow" version "8.1.1"
7-
id 'ru.vyarus.java-lib' version '3.0.0'
8-
id 'ru.vyarus.github-info' version '2.0.0'
98
id 'signing'
10-
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
119
id "com.github.ben-manes.versions" version "0.52.0"
1210
id 'net.researchgate.release' version '3.1.0'
1311
}
@@ -18,7 +16,7 @@ repositories {
1816
mavenLocal()
1917
mavenCentral()
2018
if (isBuildSnapshot) {
21-
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
19+
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
2220
}
2321
}
2422

@@ -135,13 +133,30 @@ jacocoTestReport {
135133
/**********************************************************************************************************************\
136134
* Publish
137135
**********************************************************************************************************************/
138-
nexusPublishing {
139-
repositoryDescription = "${project.group}:${rootProject.name}:${project.version}"
140-
useStaging = !isBuildSnapshot
141-
repositories {
142-
sonatype {
143-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
144-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
136+
mavenPublishing {
137+
publishToMavenCentral(true)
138+
signAllPublications()
139+
coordinates("${project.group}", "${project.name}", "${project.version}")
140+
pom {
141+
name = "${project.name}"
142+
description = "${project.group}:${project.name}:${project.version}"
143+
url = "https://github.com/kestra-io/${project.name}"
144+
licenses {
145+
license {
146+
name = 'The Apache License, Version 2.0'
147+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
148+
}
149+
}
150+
developers {
151+
developer {
152+
id = 'tchiotludo'
153+
name = 'Dehon'
154+
155+
}
156+
}
157+
scm {
158+
connection = 'scm:git:'
159+
url = "https://github.com/kestra-io/${project.name}"
145160
}
146161
}
147162
}
@@ -163,24 +178,12 @@ jar {
163178
}
164179
}
165180

166-
maven.pom {
167-
developers {
168-
developer {
169-
id = "tchiotludo"
170-
name = "Ludovic Dehon"
171-
}
172-
}
173-
}
174181

175182
shadowJar {
176183
archiveClassifier.set(null)
177184
mergeServiceFiles()
178185
}
179186

180-
github {
181-
user 'kestra-io'
182-
license 'Apache'
183-
}
184187

185188
/**********************************************************************************************************************\
186189
* Version

0 commit comments

Comments
 (0)