Skip to content

Commit 022e09c

Browse files
committed
Merge remote-tracking branch 'upstream/master' into chore/milestone-4_ready
# Conflicts: # src/main/java/io/reactiverse/awssdk/VertxNioAsyncHttpClient.java # src/test/java/io/reactiverse/awssdk/integration/apigateway/VertxApiGatewaySpec.java # src/test/java/io/reactiverse/awssdk/integration/cloudwatch/VertxCloudWatchClientSpec.java # src/test/java/io/reactiverse/awssdk/integration/dynamodb/VertxDynamoClientSpec.java # src/test/java/io/reactiverse/awssdk/integration/firehose/VertxFirehoseClientSpec.java # src/test/java/io/reactiverse/awssdk/integration/kinesis/VertxKinesisClientSpec.java # src/test/java/io/reactiverse/awssdk/integration/lambda/VertxLambdaClientSpec.java # src/test/java/io/reactiverse/awssdk/integration/s3/VertxS3ClientSpec.java
2 parents dcc4fff + 4a4e92d commit 022e09c

27 files changed

+662
-248
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
trim_trailing_whitespace = true
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
[**/examples/**.java]
12+
# 84 looks like a odd number, however
13+
# it accounts for 4 spaces (class and example method indentation)
14+
max_line_length = 84

.github/workflows/ci-release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# When a tag matching a semver number (like `1.1.0`) is pushed, then try to publish the version to bintray and create the matching release in Github
2+
name: CI-Release
3+
on:
4+
push:
5+
tags:
6+
- RELEASE-*
7+
8+
jobs:
9+
publish-release-bintray:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- 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
17+
with:
18+
java-version: 11
19+
- name: Release to Bintray
20+
uses: eskatos/gradle-command-action@v1
21+
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
28+
uses: actions/create-release@latest
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
31+
with:
32+
tag_name: ${{ steps.get_version.outputs.VERSION }}
33+
release_name: ${{ steps.get_version.outputs.VERSION }}
34+
body: |
35+
Available in Bintray/Sonatype repositories under:
36+
`io.reactiverse:aws-sdk:${{ steps.get_version.outputs.VERSION }}`
37+
draft: false
38+
prerelease: false
39+

.github/workflows/ci-snapshot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI-Snapshot
2+
on:
3+
push:
4+
tags:
5+
- SNAPSHOT-*
6+
7+
jobs:
8+
publish-snapshot-sonatype:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- 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
16+
with:
17+
java-version: 11
18+
- uses: eskatos/gradle-command-action@v1
19+
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
23+
uses: actions/create-release@latest
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
26+
with:
27+
tag_name: ${{ steps.get_version.outputs.VERSION }}-SNAPSHOT
28+
release_name: ${{ steps.get_version.outputs.VERSION }}-SNAPSHOT
29+
body: |
30+
Available in Sonatype SNAPSHOTs repository under:
31+
`io.reactiverse:aws-sdk:${{ steps.get_version.outputs.VERSION }}-SNAPSHOT`
32+
draft: true
33+
prerelease: true

.github/workflows/ci-test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Always tests on every branch push / PR / master
2+
name: CI-Test
3+
on: push
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
java: [ 8, 11 ]
11+
name: "Run tests with JDK ${{ matrix.java }}"
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-java@v1
15+
with:
16+
java-version: ${{ matrix.java }}
17+
- name: Pre-Pull localstack image
18+
run: "docker pull localstack/localstack:0.10.2"
19+
- uses: eskatos/gradle-command-action@v1
20+
with:
21+
gradle-version: 6.5
22+
arguments: test -Dtests.integration=localstack

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
out
22
.gradle
33
.idea
4+
target
45
build
56
.vertx
67
.DS_Store
8+
.run

.travis.deploy.artifacts.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@
44

55
This project provides a `VertxNioAsyncHttpClient` and a `VertxExecutor` so that you can use AWS SDK v2 in a Vert.x context.
66

7+
## Coordinates
8+
9+
Artifacts are published [here](https://search.maven.org/artifact/io.reactiverse/aws-sdk)
10+
711
## Version compatibility matrix
812

913
| Project | Vert.x | AWS sdk |
1014
| ------- | ------ | ------- |
11-
| 0.0.1 | 3.8.0 | 2.7.8 |
15+
| 0.7.0 | 3.9.4 | 2.15.23 |
16+
| 0.6.0 | 3.9.2 | 2.14.7 |
17+
| 0.5.1 | 3.9.2 | 2.13.6 |
18+
| 0.5.0 | 3.9.0 | 2.12.0 |
19+
| 0.4.0 | 3.8.3 | 2.10.16 |
20+
| 0.3.0 | 3.8.1 | 2.7.8 |
1221

1322
## Documentation
1423

@@ -59,4 +68,4 @@ Javadoc can be produced (with Java 11 otherwise it does not link Vert.x API docs
5968
> ./gradlew javadocToDocsFolder
6069
```
6170

62-
This will update the docs/javadoc with latest javadocs
71+
This will update the docs/javadoc with latest javadocs

build.gradle.kts

Lines changed: 77 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,51 @@
1-
val vertxVersion = "3.8.0"
2-
val awsSdkVersion = "2.7.8"
1+
val vertxVersion = "3.9.4"
2+
val awsSdkVersion = "2.15.23"
33
val junit5Version = "5.4.0"
44
val logbackVersion = "1.2.3"
55
val integrationOption = "tests.integration"
66

7+
group = "io.reactiverse"
8+
version = "0.7.0"
9+
710
plugins {
811
`java-library`
912
`maven-publish`
10-
signing
1113
jacoco
14+
id("com.jfrog.bintray") version "1.8.5"
1215
id("com.jaredsburrows.license") version "0.8.42"
13-
id("org.sonarqube") version "2.6"
16+
id("org.sonarqube") version "3.0"
17+
id("com.github.ben-manes.versions") version "0.34.0"
18+
}
19+
20+
// In order to publish SNAPSHOTs to Sonatype Snapshots repository => the CI should define such `ossrhUsername` and `ossrhPassword` properties
21+
if (!project.hasProperty("ossrhUsername")) {
22+
logger.warn("No ossrhUsername property defined in your Gradle properties file to deploy to Sonatype Snapshots, using 'foo' to make the build pass")
23+
project.extra["ossrhUsername"] = "foo"
24+
}
25+
if (!project.hasProperty("ossrhPassword")) {
26+
logger.warn("No ossrhPassword property defined in your Gradle properties file to deploy to Sonatype Snapshots, using 'bar' to make the build pass")
27+
project.extra["ossrhPassword"] = "bar"
28+
}
29+
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+
}
1449
}
1550

1651
repositories {
@@ -20,18 +55,11 @@ repositories {
2055
}
2156
}
2257

23-
group = "io.reactiverse"
24-
version = "0.0.1-SNAPSHOT"
25-
26-
project.extra["isReleaseVersion"] = !version.toString().endsWith("SNAPSHOT")
27-
28-
if (!project.hasProperty("ossrhUsername")) {
29-
logger.warn("No ossrhUsername property defined in your Gradle properties file to deploy to Maven Central, using 'foo' to make the build pass")
30-
project.extra["ossrhUsername"] = "foo"
31-
}
32-
if (!project.hasProperty("ossrhPassword")) {
33-
logger.warn("No ossrhPassword property defined in your Gradle properties file to deploy to Maven Central, using 'bar' to make the build pass")
34-
project.extra["ossrhPassword"] = "bar"
58+
fun isNonStable(version: String): Boolean {
59+
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
60+
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
61+
val isStable = stableKeyword || regex.matches(version)
62+
return isStable.not()
3563
}
3664

3765
dependencies {
@@ -40,7 +68,7 @@ dependencies {
4068

4169
testImplementation("io.vertx:vertx-junit5:$vertxVersion")
4270
testImplementation("io.vertx:vertx-rx-java2:$vertxVersion")
43-
testImplementation("cloud.localstack:localstack-utils:0.1.22")
71+
testImplementation("cloud.localstack:localstack-utils:0.2.5")
4472
testImplementation("ch.qos.logback:logback-classic:$logbackVersion")
4573
testImplementation("ch.qos.logback:logback-core:$logbackVersion")
4674
testImplementation("software.amazon.awssdk:aws-sdk-java:$awsSdkVersion")
@@ -54,10 +82,15 @@ java {
5482
}
5583

5684
jacoco {
57-
toolVersion = "0.8.2"
85+
toolVersion = "0.8.5"
5886
}
5987

6088
tasks {
89+
named("dependencyUpdates", com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask::class.java).configure {
90+
rejectVersionIf {
91+
isNonStable(candidate.version)
92+
}
93+
}
6194

6295
jacocoTestReport {
6396
dependsOn(":test")
@@ -97,21 +130,20 @@ tasks {
97130
if (JavaVersion.current().isJava9Compatible) {
98131
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
99132
}
133+
options {
134+
source("8")
135+
}
100136
(options as StandardJavadocDocletOptions).links(
101-
"http://docs.oracle.com/javase/8/docs/api/",
137+
"https://docs.oracle.com/javase/8/docs/api/",
102138
"https://sdk.amazonaws.com/java/api/latest/",
103-
"http://vertx.io/docs/3.8.0/apidocs/",
139+
"https://vertx.io/docs/${vertxVersion}/apidocs/",
104140
"http://www.reactive-streams.org/reactive-streams-1.0.0-javadoc/",
105-
"http://netty.io/4.1/api/"
141+
"https://netty.io/4.1/api/"
106142
)
107143
}
108144

109-
withType<Sign> {
110-
onlyIf { project.extra["isReleaseVersion"] as Boolean }
111-
}
112-
113145
withType<Wrapper> {
114-
gradleVersion = "5.4.1"
146+
gradleVersion = "6.5"
115147
}
116148
}
117149

@@ -121,9 +153,10 @@ publishing {
121153
from(components["java"])
122154
artifact(tasks["sourcesJar"])
123155
artifact(tasks["javadocJar"])
156+
setVersion(project.version)
124157
pom {
125158
name.set(project.name)
126-
description.set("Reactiverse AWS SDK 2 with Vert.x")
159+
description.set("Reactiverse AWS SDK v2 with Vert.x")
127160
url.set("https://github.com/reactiverse/aws-sdk")
128161
licenses {
129162
license {
@@ -144,32 +177,24 @@ publishing {
144177
url.set("https://github.com/reactiverse/aws-sdk")
145178
}
146179
}
147-
}
148-
}
149-
repositories {
150-
// To locally check out the poms
151-
maven {
152-
val releasesRepoUrl = uri("$buildDir/repos/releases")
153-
val snapshotsRepoUrl = uri("$buildDir/repos/snapshots")
154-
name = "BuildDir"
155-
url = if (project.extra["isReleaseVersion"] as Boolean) releasesRepoUrl else snapshotsRepoUrl
156-
}
157-
maven {
158-
val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
159-
val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
160-
name = "SonatypeOSS"
161-
url = if (project.extra["isReleaseVersion"] as Boolean) releasesRepoUrl else snapshotsRepoUrl
162-
credentials {
163-
val ossrhUsername: String by project
164-
val ossrhPassword: String by project
165-
username = ossrhUsername
166-
password = ossrhPassword
180+
repositories {
181+
// To locally check out the poms
182+
maven {
183+
name = "BuildDir"
184+
url = uri("$buildDir/repos/snapshots")
185+
}
186+
// Snapshots are published to Sonatype's repository directly
187+
maven {
188+
name = "SonatypeOSS"
189+
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
190+
credentials {
191+
val ossrhUsername: String by project
192+
val ossrhPassword: String by project
193+
username = ossrhUsername
194+
password = ossrhPassword
195+
}
196+
}
167197
}
168198
}
169199
}
170200
}
171-
172-
signing {
173-
sign(publishing.publications["mavenJava"])
174-
}
175-

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Using maven:
1313
```
1414
<dependency>
1515
<groupId>io.reactiverse</groupId>
16-
<artifactId>aws-sdk</artifactId>
17-
<version>0.0.1</version>
16+
<artifactId>vertx-aws-sdk</artifactId>
17+
<version>0.3.0</version>
1818
</dependency>
1919
```
2020

2121
Using Gradle:
2222
```
23-
implementation("io.reactiverse:aws-sdk:0.0.1")
23+
implementation("io.reactiverse:vertx-aws-sdk:0.3.0")
2424
```
2525

2626
## How-to

0 commit comments

Comments
 (0)