@@ -11,6 +11,7 @@ plugins {
11
11
id ' java-library'
12
12
id ' signing'
13
13
id ' maven-publish'
14
+ id ' org.jreleaser' version ' 1.18.0'
14
15
id ' jacoco'
15
16
id ' jvm-test-suite'
16
17
id ' jacoco-report-aggregation'
@@ -26,7 +27,7 @@ repositories {
26
27
27
28
group = ' software.amazon.nio.s3'
28
29
archivesBaseName = ' nio-spi-for-s3'
29
- version = ' 2.2.0 '
30
+ version = ' 2.2.1 '
30
31
31
32
java {
32
33
withSourcesJar()
@@ -107,18 +108,47 @@ publishing {
107
108
}
108
109
repositories {
109
110
maven {
110
- def releasesRepoUrl = ' https://aws.oss.sonatype.org/service/local/staging/deploy/maven2/'
111
- def snapshotsRepoUrl = ' https://aws.oss.sonatype.org/content/repositories/snapshots'
112
- url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
113
- credentials(PasswordCredentials )
111
+ url = layout. buildDirectory. dir(' staging-deploy' )
114
112
}
115
113
}
116
114
}
117
115
118
116
signing {
117
+ def signingKey = findProperty(' jreleaser.gpg.secret.key' )?. toString()?. replace(' \\ ' , ' ' )
118
+ def signingPassword = findProperty(' jreleaser.gpg.passphrase' )
119
+
120
+ if (signingKey && signingPassword) {
121
+ useInMemoryPgpKeys(signingKey, signingPassword)
122
+ } else {
123
+ useGpgCmd()
124
+ // The key ID will be selected by the gpg command
125
+ }
126
+
119
127
sign publishing. publications. maven
120
128
}
121
129
130
+ jreleaser {
131
+ signing {
132
+ active = ' ALWAYS' // Keep signing active
133
+ armored = true
134
+ mode = ' COMMAND' // Use the GPG command instead of in-memory keys
135
+ // The key ID is set in ~/.gnupg/gpg.conf
136
+ }
137
+ deploy {
138
+ maven {
139
+ mavenCentral {
140
+ sonatype {
141
+ active = ' ALWAYS'
142
+ url = ' https://central.sonatype.com/api/v1/publisher'
143
+ stagingRepository(' build/staging-deploy' )
144
+ sign = false // Disable signing during deployment since files are already signed
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+
151
+
122
152
javadoc {
123
153
if (JavaVersion . current(). isJava9Compatible()) {
124
154
options. addBooleanOption(' html5' , true )
@@ -130,10 +160,10 @@ testing {
130
160
suites {
131
161
integrationTest(JvmTestSuite ) {
132
162
dependencies {
133
- implementation project
134
- implementation ' org.testcontainers:junit-jupiter:1.21.0'
135
- implementation ' org.testcontainers:localstack:1.21.0'
136
- implementation ' org.testcontainers:testcontainers:1.21.0'
163
+ implementation( project())
164
+ implementation( ' org.testcontainers:junit-jupiter:1.21.0' )
165
+ implementation( ' org.testcontainers:localstack:1.21.0' )
166
+ implementation( ' org.testcontainers:testcontainers:1.21.0' )
137
167
}
138
168
}
139
169
withType(JvmTestSuite ). configureEach {
@@ -146,11 +176,11 @@ testing {
146
176
}
147
177
}
148
178
dependencies {
149
- implementation ' org.assertj:assertj-core:3.27.3'
150
- implementation ' org.mockito:mockito-core:5.18.0'
151
- implementation ' org.mockito:mockito-junit-jupiter:5.18.0'
152
- implementation ' com.github.stefanbirkner:system-lambda:1.2.1'
153
- runtimeOnly ' ch.qos.logback:logback-classic:1.5.18'
179
+ implementation( ' org.assertj:assertj-core:3.27.3' )
180
+ implementation( ' org.mockito:mockito-core:5.18.0' )
181
+ implementation( ' org.mockito:mockito-junit-jupiter:5.18.0' )
182
+ implementation( ' com.github.stefanbirkner:system-lambda:1.2.1' )
183
+ runtimeOnly( ' ch.qos.logback:logback-classic:1.5.18' )
154
184
}
155
185
}
156
186
}
0 commit comments