Skip to content

Commit 1ab3ef6

Browse files
Markjschreiber/jreleaser (#670)
* bump minor version * finalize build config
1 parent 8a798fa commit 1ab3ef6

File tree

3 files changed

+48
-18
lines changed

3 files changed

+48
-18
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ For example:
6969
<dependency>
7070
<groupId>software.amazon.nio.s3</groupId>
7171
<artifactId>aws-java-nio-spi-for-s3</artifactId>
72-
<version>2.2.0</version>
72+
<version>2.2.1</version>
7373
</dependency>
7474
```
7575

7676
`build.gradle(.kts)`
7777
```groovy
78-
implementation("software.amazon.nio.s3:aws-java-nio-spi-for-s3:2.2.0")
78+
implementation("software.amazon.nio.s3:aws-java-nio-spi-for-s3:2.2.1")
7979
```
8080

8181
The library heavily relies on the `crt` client from aws. It uses the [`uber`
@@ -86,7 +86,7 @@ and wide range of supported platforms.
8686
> If **size** is an **issue**, you can **exclude** the `crt` dependency from the library and import the [specific `crt` library](https://github.com/awslabs/aws-crt-java?tab=readme-ov-file#platform-specific-jars)
8787
> for your platform. For example:
8888
> ```
89-
> implementation("software.amazon.nio.s3:aws-java-nio-spi-for-s3:2.2.0") {
89+
> implementation("software.amazon.nio.s3:aws-java-nio-spi-for-s3:2.2.1") {
9090
> exclude group: 'software.amazon.awssdk.crt', module: 'aws-crt'
9191
> }
9292
> implementation 'software.amazon.awssdk.crt:aws-crt:0.31.1:linux-x86_64'

build.gradle

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ plugins {
1111
id 'java-library'
1212
id 'signing'
1313
id 'maven-publish'
14+
id 'org.jreleaser' version '1.18.0'
1415
id 'jacoco'
1516
id 'jvm-test-suite'
1617
id 'jacoco-report-aggregation'
@@ -26,7 +27,7 @@ repositories {
2627

2728
group = 'software.amazon.nio.s3'
2829
archivesBaseName = 'nio-spi-for-s3'
29-
version = '2.2.0'
30+
version = '2.2.1'
3031

3132
java {
3233
withSourcesJar()
@@ -107,18 +108,47 @@ publishing {
107108
}
108109
repositories {
109110
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')
114112
}
115113
}
116114
}
117115

118116
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+
119127
sign publishing.publications.maven
120128
}
121129

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+
122152
javadoc {
123153
if (JavaVersion.current().isJava9Compatible()) {
124154
options.addBooleanOption('html5', true)
@@ -130,10 +160,10 @@ testing {
130160
suites {
131161
integrationTest(JvmTestSuite) {
132162
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')
137167
}
138168
}
139169
withType(JvmTestSuite).configureEach {
@@ -146,11 +176,11 @@ testing {
146176
}
147177
}
148178
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')
154184
}
155185
}
156186
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)