Skip to content

Commit 95b654e

Browse files
authored
feat/2022-upgrades-1
Upgrade Vert.x to 4.2.4, AWS to 2.17, Gradle to 7.4, and logback etc.
2 parents 2ae76fd + d510441 commit 95b654e

File tree

10 files changed

+267
-214
lines changed

10 files changed

+267
-214
lines changed

.github/workflows/ci-release.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,43 @@ name: CI-Release
33
on:
44
push:
55
tags:
6-
- RELEASE-*
6+
- '*-RELEASE'
77

88
jobs:
9-
publish-release-bintray:
9+
publish-release-sonatype:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
- name: Get the version
14-
id: get_version
15-
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d '-' -f 2)
16-
- uses: actions/setup-java@v1
13+
14+
- name: Setup java
15+
uses: actions/setup-java@v1
1716
with:
1817
java-version: 11
19-
- name: Release to Bintray
20-
uses: eskatos/gradle-command-action@v1
18+
19+
- name: Setup Gradle
20+
uses: gradle/gradle-build-action@v2
2121
with:
22-
gradle-version: 6.5
23-
arguments: test bintrayUpload
24-
env:
25-
BINTRAY_USER: ${{secrets.BINTRAY_USER}}
26-
BINTRAY_KEY: ${{secrets.BINTRAY_KEY}}
27-
- name: Creates a Release in Github
22+
gradle-version: 7.4
23+
24+
- name: Get Project version
25+
id: get_version
26+
run: echo ::set-output name=VERSION::$(gradle properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')
27+
28+
- name: Publish Release to Sonatype
29+
uses: gradle/gradle-build-action@v2
30+
with:
31+
gradle-version: 7.4
32+
arguments: assemble publish -PossrhUsername=${{secrets.SONATYPE_NEXUS_USERNAME}} -PossrhPassword=${{secrets.SONATYPE_NEXUS_PASSWORD}} --stacktrace
33+
34+
- name: Create Release in Github
2835
uses: actions/create-release@latest
2936
env:
3037
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
3138
with:
3239
tag_name: ${{ steps.get_version.outputs.VERSION }}
3340
release_name: ${{ steps.get_version.outputs.VERSION }}
3441
body: |
35-
Available in Bintray/Sonatype repositories under:
42+
Available in Sonatype SNAPSHOTs repository under:
3643
`io.reactiverse:aws-sdk:${{ steps.get_version.outputs.VERSION }}`
3744
draft: false
3845
prerelease: false
39-

.github/workflows/ci-snapshot.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,43 @@ name: CI-Snapshot
22
on:
33
push:
44
tags:
5-
- SNAPSHOT-*
5+
- '*-SNAPSHOT'
66

77
jobs:
88
publish-snapshot-sonatype:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: Get the version
13-
id: get_version
14-
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d '-' -f 2)
15-
- uses: actions/setup-java@v1
12+
13+
- name: Setup java
14+
uses: actions/setup-java@v1
1615
with:
1716
java-version: 11
18-
- uses: eskatos/gradle-command-action@v1
17+
18+
- name: Setup Gradle
19+
uses: gradle/gradle-build-action@v2
20+
with:
21+
gradle-version: 7.4
22+
23+
- name: Get Project version
24+
id: get_version
25+
run: echo ::set-output name=VERSION::$(gradle properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')
26+
27+
- name: Publish Release to Sonatype
28+
uses: gradle/gradle-build-action@v2
1929
with:
20-
gradle-version: 6.5
21-
arguments: assemble publish -PossrhUsername=${{secrets.SONATYPE_NEXUS_USERNAME}} -PossrhPassword=${{secrets.SONATYPE_NEXUS_PASSWORD}}
22-
- name: Create Snapshot Release in Github
30+
gradle-version: 7.4
31+
arguments: assemble publish -PossrhUsername=${{secrets.SONATYPE_NEXUS_USERNAME}} -PossrhPassword=${{secrets.SONATYPE_NEXUS_PASSWORD}} --stacktrace
32+
33+
- name: Create Release in Github
2334
uses: actions/create-release@latest
2435
env:
2536
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
2637
with:
27-
tag_name: ${{ steps.get_version.outputs.VERSION }}-SNAPSHOT
28-
release_name: ${{ steps.get_version.outputs.VERSION }}-SNAPSHOT
38+
tag_name: ${{ steps.get_version.outputs.VERSION }}
39+
release_name: ${{ steps.get_version.outputs.VERSION }}
2940
body: |
3041
Available in Sonatype SNAPSHOTs repository under:
31-
`io.reactiverse:aws-sdk:${{ steps.get_version.outputs.VERSION }}-SNAPSHOT`
42+
`io.reactiverse:aws-sdk:${{ steps.get_version.outputs.VERSION }}`
3243
draft: true
3344
prerelease: true

.github/workflows/ci-test.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
java: [ 8, 11 ]
10+
java: [ 8, 11, 17 ]
1111
name: "Run tests with JDK ${{ matrix.java }}"
1212
steps:
1313
- uses: actions/checkout@v2
1414
- uses: actions/setup-java@v1
1515
with:
1616
java-version: ${{ matrix.java }}
17+
1718
- name: Pre-Pull localstack image
18-
run: "docker pull localstack/localstack:0.10.2"
19-
- uses: eskatos/gradle-command-action@v1
19+
run: "docker pull localstack/localstack:0.14"
20+
21+
22+
- uses: gradle/gradle-build-action@v2
2023
with:
21-
gradle-version: 6.5
24+
gradle-version: 7.4
2225
arguments: test -Dtests.integration=localstack

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ Artifacts are published [here](https://search.maven.org/artifact/io.reactiverse/
1010

1111
## Version compatibility matrix
1212

13-
| Project | Vert.x | AWS sdk |
14-
| ------- | ------ | ------- |
15-
| 1.0.0 | 4.0.0 | 2.15.45 |
16-
| 0.7.0 | 3.9.4 | 2.15.23 |
17-
| 0.6.0 | 3.9.2 | 2.14.7 |
18-
| 0.5.1 | 3.9.2 | 2.13.6 |
19-
| 0.5.0 | 3.9.0 | 2.12.0 |
20-
| 0.4.0 | 3.8.3 | 2.10.16 |
21-
| 0.3.0 | 3.8.1 | 2.7.8 |
13+
| Project | Vert.x | AWS sdk |
14+
|---------|--------|----------|
15+
| 1.1.0 | 4.2.5 | 2.17.129 |
16+
| 1.0.0 | 4.0.0 | 2.15.45 |
17+
| 0.7.0 | 3.9.4 | 2.15.23 |
18+
| 0.6.0 | 3.9.2 | 2.14.7 |
19+
| 0.5.1 | 3.9.2 | 2.13.6 |
20+
| 0.5.0 | 3.9.0 | 2.12.0 |
21+
| 0.4.0 | 3.8.3 | 2.10.16 |
22+
| 0.3.0 | 3.8.1 | 2.7.8 |
2223

2324
## Documentation
2425

build.gradle.kts

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
val vertxVersion = "4.0.0"
2-
val awsSdkVersion = "2.15.45"
3-
val junit5Version = "5.7.0"
4-
val logbackVersion = "1.2.3"
1+
val vertxVersion = "4.2.4"
2+
val awsSdkVersion = "2.17.129"
3+
val junit5Version = "5.8.2"
4+
val logbackVersion = "1.2.10"
55
val integrationOption = "tests.integration"
66

77
group = "io.reactiverse"
8-
version = "1.0.0"
8+
version = "1.1.0-SNAPSHOT"
99

1010
plugins {
1111
`java-library`
1212
`maven-publish`
13+
signing
1314
jacoco
14-
id("com.jfrog.bintray") version "1.8.5"
15-
id("com.jaredsburrows.license") version "0.8.42"
16-
id("org.sonarqube") version "3.0"
17-
id("com.github.ben-manes.versions") version "0.34.0"
15+
id("org.sonarqube") version "3.3"
16+
id("com.github.ben-manes.versions") version "0.42.0"
1817
}
1918

2019
// In order to publish SNAPSHOTs to Sonatype Snapshots repository => the CI should define such `ossrhUsername` and `ossrhPassword` properties
@@ -27,26 +26,7 @@ if (!project.hasProperty("ossrhPassword")) {
2726
project.extra["ossrhPassword"] = "bar"
2827
}
2928

30-
// Releases are published to Bintray under the Reactiverse organization
31-
// Then manually synced to Central
32-
bintray {
33-
user = System.getenv("BINTRAY_USER")
34-
key = System.getenv("BINTRAY_KEY")
35-
with(pkg) {
36-
userOrg = "reactiverse"
37-
repo = "releases"
38-
name = project.name
39-
setLicenses("Apache-2.0")
40-
vcsUrl = "https://github.com/reactiverse/aws-sdk"
41-
setLabels("vertx", "vert.x", "aws-sdk", "amazon web services")
42-
publicDownloadNumbers = true
43-
with(version) {
44-
name = project.version.toString()
45-
description = "${project.description}. Version: ${project.version}"
46-
}
47-
setPublications("mavenJava")
48-
}
49-
}
29+
extra["isReleaseVersion"] = !version.toString().endsWith("SNAPSHOT")
5030

5131
repositories {
5232
mavenCentral()
@@ -68,7 +48,7 @@ dependencies {
6848

6949
testImplementation("io.vertx:vertx-junit5:$vertxVersion")
7050
testImplementation("io.vertx:vertx-rx-java2:$vertxVersion")
71-
testImplementation("cloud.localstack:localstack-utils:0.2.5")
51+
testImplementation("cloud.localstack:localstack-utils:0.2.20")
7252
testImplementation("ch.qos.logback:logback-classic:$logbackVersion")
7353
testImplementation("ch.qos.logback:logback-core:$logbackVersion")
7454
testImplementation("software.amazon.awssdk:aws-sdk-java:$awsSdkVersion")
@@ -81,7 +61,7 @@ java {
8161
}
8262

8363
jacoco {
84-
toolVersion = "0.8.5"
64+
toolVersion = "0.8.7"
8565
}
8666

8767
tasks {
@@ -94,9 +74,9 @@ tasks {
9474
jacocoTestReport {
9575
dependsOn(":test")
9676
reports {
97-
xml.isEnabled = true
98-
csv.isEnabled = false
99-
html.destination = file("$buildDir/jacocoHtml")
77+
xml.required.set(true)
78+
csv.required.set(false)
79+
html.outputLocation.set(file("$buildDir/jacocoHtml"))
10080
}
10181
}
10282

@@ -141,8 +121,16 @@ tasks {
141121
)
142122
}
143123

124+
withType<Sign> {
125+
onlyIf { project.extra["isReleaseVersion"] as Boolean }
126+
}
127+
144128
withType<Wrapper> {
145-
gradleVersion = "6.5"
129+
gradleVersion = "7.4"
130+
}
131+
132+
withType<JavaCompile> {
133+
options.compilerArgs.add("-Xlint:deprecation")
146134
}
147135
}
148136

@@ -177,23 +165,30 @@ publishing {
177165
}
178166
}
179167
repositories {
180-
// To locally check out the poms
181-
maven {
182-
name = "BuildDir"
183-
url = uri("$buildDir/repos/snapshots")
184-
}
185-
// Snapshots are published to Sonatype's repository directly
186-
maven {
187-
name = "SonatypeOSS"
188-
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
189-
credentials {
190-
val ossrhUsername: String by project
191-
val ossrhPassword: String by project
192-
username = ossrhUsername
193-
password = ossrhPassword
194-
}
168+
// To locally check out the poms
169+
maven {
170+
val releasesRepoUrl = uri("$buildDir/repos/releases")
171+
val snapshotsRepoUrl = uri("$buildDir/repos/snapshots")
172+
name = "BuildDir"
173+
url = if (project.extra["isReleaseVersion"] as Boolean) releasesRepoUrl else snapshotsRepoUrl
174+
}
175+
maven {
176+
val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
177+
val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
178+
name = "SonatypeOSS"
179+
url = if (project.extra["isReleaseVersion"] as Boolean) releasesRepoUrl else snapshotsRepoUrl
180+
credentials {
181+
val ossrhUsername: String by project
182+
val ossrhPassword: String by project
183+
username = ossrhUsername
184+
password = ossrhPassword
195185
}
186+
}
196187
}
197188
}
198189
}
199190
}
191+
192+
signing {
193+
sign(publishing.publications["mavenJava"])
194+
}

gradle/wrapper/gradle-wrapper.jar

1.1 KB
Binary file not shown.
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-6.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)