Skip to content

Commit cd24e16

Browse files
committed
migrate to maven central publishing with jreleaser
1 parent 00336e5 commit cd24e16

File tree

1 file changed

+50
-12
lines changed

1 file changed

+50
-12
lines changed

glsl-preprocessor/build.gradle

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ plugins {
33
id 'java-library'
44
id 'maven-publish'
55
id 'signing'
6-
id 'org.danilopianini.publish-on-central' version '0.7.5' // a newer version 2.0.6 exists but it's annoying to use
76
id 'jacoco'
87
id 'com.adarshr.test-logger' version '3.2.0'
8+
id 'org.jreleaser' version '1.19.0'
99
// id "com.github.spotbugs" version "5.0.13"
1010
}
1111

@@ -52,28 +52,66 @@ jacocoTestReport {
5252
}
5353
}
5454

55-
publishOnCentral {
56-
configureMavenCentral.set(true)
57-
projectDescription.set('GLSL Preprocessing with the C Preprocessor in Java - based on JCPP')
58-
projectLongName.set('glsl-preprocessor')
59-
projectUrl.set('https://github.com/IrisShaders/glsl-preprocessor')
60-
scmConnection.set('[email protected]:IrisShaders/glsl-preprocessor.git')
61-
licenseName.set('GNU General Public License v3.0 with exceptions')
62-
licenseUrl.set('https://www.gnu.org/licenses/gpl-3.0.en.html')
55+
java {
56+
withJavadocJar()
57+
withSourcesJar()
58+
}
59+
60+
jreleaser {
61+
gitRootSearch = true
62+
signing {
63+
active = 'ALWAYS'
64+
}
65+
deploy {
66+
maven {
67+
mavenCentral {
68+
sonatype {
69+
active = 'ALWAYS'
70+
url = 'https://central.sonatype.com/api/v1/publisher'
71+
stagingRepository('build/staging-deploy')
72+
}
73+
}
74+
}
75+
}
6376
}
6477

6578
publishing {
6679
publications {
6780
javaMaven(MavenPublication) {
81+
groupId = 'io.github.douira'
82+
artifactId = 'glsl-preprocessor'
83+
84+
from components.java
85+
6886
pom {
87+
name = 'glsl-preprocessor'
88+
description = 'GLSL Preprocessing with the C Preprocessor in Java - based on JCPP'
89+
url = 'https://github.com/IrisShaders/glsl-preprocessor'
90+
licenses {
91+
license {
92+
name = 'GNU General Public License v3.0 with exceptions'
93+
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
94+
}
95+
}
6996
developers {
7097
developer {
71-
name.set('douira')
72-
email.set('[email protected]')
73-
url.set('https://douira.github.io')
98+
name = 'douira'
99+
100+
url = 'https://douira.github.io'
74101
}
75102
}
103+
scm {
104+
connection = 'scm:git:git://github.com/IrisShaders/glsl-preprocessor.git'
105+
developerConnection = 'scm:git:ssh://github.com/IrisShaders/glsl-preprocessor.git'
106+
url = 'https://github.com/IrisShaders/glsl-preprocessor'
107+
}
76108
}
77109
}
78110
}
111+
112+
repositories {
113+
maven {
114+
url = layout.buildDirectory.dir('staging-deploy')
115+
}
116+
}
79117
}

0 commit comments

Comments
 (0)