1
- val vertxVersion = " 3.8.0 "
2
- val awsSdkVersion = " 2.7.8 "
1
+ val vertxVersion = " 3.9.4 "
2
+ val awsSdkVersion = " 2.15.23 "
3
3
val junit5Version = " 5.4.0"
4
4
val logbackVersion = " 1.2.3"
5
5
val integrationOption = " tests.integration"
6
6
7
+ group = " io.reactiverse"
8
+ version = " 0.7.0"
9
+
7
10
plugins {
8
11
`java- library`
9
12
`maven- publish`
10
- signing
11
13
jacoco
14
+ id(" com.jfrog.bintray" ) version " 1.8.5"
12
15
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
+ }
14
49
}
15
50
16
51
repositories {
@@ -20,18 +55,11 @@ repositories {
20
55
}
21
56
}
22
57
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 ()
35
63
}
36
64
37
65
dependencies {
@@ -40,7 +68,7 @@ dependencies {
40
68
41
69
testImplementation(" io.vertx:vertx-junit5:$vertxVersion " )
42
70
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 " )
44
72
testImplementation(" ch.qos.logback:logback-classic:$logbackVersion " )
45
73
testImplementation(" ch.qos.logback:logback-core:$logbackVersion " )
46
74
testImplementation(" software.amazon.awssdk:aws-sdk-java:$awsSdkVersion " )
@@ -54,10 +82,15 @@ java {
54
82
}
55
83
56
84
jacoco {
57
- toolVersion = " 0.8.2 "
85
+ toolVersion = " 0.8.5 "
58
86
}
59
87
60
88
tasks {
89
+ named(" dependencyUpdates" , com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask ::class .java).configure {
90
+ rejectVersionIf {
91
+ isNonStable(candidate.version)
92
+ }
93
+ }
61
94
62
95
jacocoTestReport {
63
96
dependsOn(" :test" )
@@ -97,21 +130,20 @@ tasks {
97
130
if (JavaVersion .current().isJava9Compatible) {
98
131
(options as StandardJavadocDocletOptions ).addBooleanOption(" html5" , true )
99
132
}
133
+ options {
134
+ source(" 8" )
135
+ }
100
136
(options as StandardJavadocDocletOptions ).links(
101
- " http ://docs.oracle.com/javase/8/docs/api/" ,
137
+ " https ://docs.oracle.com/javase/8/docs/api/" ,
102
138
" https://sdk.amazonaws.com/java/api/latest/" ,
103
- " http ://vertx.io/docs/3.8.0 /apidocs/" ,
139
+ " https ://vertx.io/docs/${vertxVersion} /apidocs/" ,
104
140
" 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/"
106
142
)
107
143
}
108
144
109
- withType<Sign > {
110
- onlyIf { project.extra[" isReleaseVersion" ] as Boolean }
111
- }
112
-
113
145
withType<Wrapper > {
114
- gradleVersion = " 5.4.1 "
146
+ gradleVersion = " 6.5 "
115
147
}
116
148
}
117
149
@@ -121,9 +153,10 @@ publishing {
121
153
from(components[" java" ])
122
154
artifact(tasks[" sourcesJar" ])
123
155
artifact(tasks[" javadocJar" ])
156
+ setVersion(project.version)
124
157
pom {
125
158
name.set(project.name)
126
- description.set(" Reactiverse AWS SDK 2 with Vert.x" )
159
+ description.set(" Reactiverse AWS SDK v2 with Vert.x" )
127
160
url.set(" https://github.com/reactiverse/aws-sdk" )
128
161
licenses {
129
162
license {
@@ -144,32 +177,24 @@ publishing {
144
177
url.set(" https://github.com/reactiverse/aws-sdk" )
145
178
}
146
179
}
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
+ }
167
197
}
168
198
}
169
199
}
170
200
}
171
-
172
- signing {
173
- sign(publishing.publications[" mavenJava" ])
174
- }
175
-
0 commit comments