@@ -2,11 +2,18 @@ import java.text.SimpleDateFormat
22
33plugins {
44 id ' java-library'
5+ id ' maven-publish'
6+ id ' signing'
57 id ' org.jreleaser' version ' 1.16.0'
68}
79
10+ ext {
11+ copyright = ' 2019-2025 Ipregistry'
12+ }
13+
814group = ' co.ipregistry'
915version = ' 5.0.0'
16+ description = ' Official Java client for Ipregistry, a fast, reliable IP geolocation and threat data API.'
1017
1118repositories {
1219 mavenCentral()
@@ -104,3 +111,55 @@ test {
104111integrationTest {
105112 useJUnitPlatform()
106113}
114+
115+ publishing {
116+ publications {
117+ maven(MavenPublication ) {
118+ groupId = ' co.ipregistry'
119+ artifactId = ' ipregistry-client'
120+ from components. java
121+
122+ pom {
123+ name = ' Ipregistry Client'
124+ description = ' Official Java client for Ipregistry, a fast, reliable IP geolocation and threat data API.'
125+ url = ' https://github.com/ipregistry/ipregistry-java'
126+
127+ licenses {
128+ license {
129+ name = ' The Apache License, Version 2.0'
130+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
131+ }
132+ }
133+
134+ developers {
135+ developer {
136+ name = ' Ipregistry Team'
137+ organizationUrl = ' https://ipregistry.co'
138+ }
139+ }
140+
141+ scm {
142+ connection = ' scm:git:git://github.com/ipregistry/ipregistry-java.git'
143+ developerConnection = ' scm:git:ssh://github.com:ipregistry/ipregistry-java.git'
144+ url = ' https://github.com/ipregistry/ipregistry-java/tree/main'
145+ }
146+ }
147+ }
148+ }
149+
150+ repositories {
151+ maven {
152+ name = ' staging'
153+ url = layout. buildDirectory. dir(' staging-deploy' )
154+ }
155+ }
156+ }
157+
158+ signing {
159+ required = { gradle. taskGraph. hasTask(' publish' ) }
160+ sign publishing. publications. maven
161+ }
162+
163+ jreleaser {
164+ configFile = file(' jreleaser.yml' )
165+ }
0 commit comments