Skip to content

Commit ce4cfc2

Browse files
authored
. (#5)
1 parent c2d2b96 commit ce4cfc2

File tree

1 file changed

+40
-36
lines changed

1 file changed

+40
-36
lines changed

build.gradle

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'java'
33
id 'maven-publish'
4-
id 'signing' // Add signing plugin for GPG signing
4+
id 'org.jreleaser' version '1.17.0'
55
}
66

77
group = 'gg.launchblock'
@@ -30,49 +30,53 @@ dependencies {
3030

3131
publishing {
3232
publications {
33-
mavenJava(MavenPublication) {
34-
from components.java
35-
36-
// Include POM customizations (if needed)
37-
pom.withXml {
38-
39-
// Define the project's POM metadata
40-
def projectNode = asNode()
41-
projectNode.appendNode('name', 'LaunchBlock Java SDK')
42-
projectNode.appendNode('description', 'A Java SDK for interacting with the LaunchBlock API')
43-
projectNode.appendNode('url', 'https://github.com/LaunchBlockMC/sdk-java')
44-
45-
// Add license information
46-
def licensesNode = projectNode.appendNode('licenses')
47-
def licenseNode = licensesNode.appendNode('license')
48-
licenseNode.appendNode('name', 'The Apache License, Version 2.0')
49-
licenseNode.appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
33+
maven(MavenPublication) {
34+
groupId = 'gg.launchblock'
35+
artifactId = 'sdk-java'
5036

51-
// SCM information
52-
def scmNode = projectNode.appendNode('scm')
53-
scmNode.appendNode('connection', 'scm:git:[email protected]:LaunchBlockMC/sdk-java.git')
54-
scmNode.appendNode('developerConnection', 'scm:git:[email protected]:LaunchBlockMC/sdk-java.git')
55-
scmNode.appendNode('url', 'https://github.com/LaunchBlockMC/sdk-java')
37+
from components.java
38+
39+
pom {
40+
name = 'LaunchBlock Java SDK'
41+
description = 'A Java SDK for interacting with our API'
42+
url = 'https://github.com/LaunchBlockMC/sdk-java'
43+
inceptionYear = '2025'
44+
licenses {
45+
license {
46+
name = 'Apache-2.0'
47+
url = 'https://spdx.org/licenses/Apache-2.0.html'
48+
}
49+
}
50+
scm {
51+
connection = 'scm:git:https://github.com/aalmiray/app.git'
52+
developerConnection = 'scm:git:ssh://github.com/aalmiray/app.git'
53+
url = 'http://github.com/aalmiray/app'
54+
}
5655
}
5756
}
5857
}
5958

6059
repositories {
6160
maven {
62-
name = "SonatypeOSS"
63-
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") // Sonatype's repository
64-
65-
credentials {
66-
username = project.findProperty("sonatypeUsername") ?: System.getenv("SONATYPE_USERNAME")
67-
password = project.findProperty("sonatypePassword") ?: System.getenv("SONATYPE_PASSWORD")
68-
}
61+
url = layout.buildDirectory.dir('staging-deploy')
6962
}
7063
}
7164
}
7265

73-
signing {
74-
useGpgCmd()
75-
// Ensure the project is signed
76-
sign publishing.publications.mavenJava
77-
}
78-
66+
jreleaser {
67+
signing {
68+
active = 'ALWAYS'
69+
armored = true
70+
}
71+
deploy {
72+
maven {
73+
mavenCentral {
74+
sonatype {
75+
active = 'ALWAYS'
76+
url = 'https://central.sonatype.com/api/v1/publisher'
77+
stagingRepository('target/staging-deploy')
78+
}
79+
}
80+
}
81+
}
82+
}

0 commit comments

Comments
 (0)