Skip to content

Commit 6c01f5b

Browse files
author
dgeorgiev
committed
Merge branch 'release/2.0.0'
2 parents f321924 + 5c46500 commit 6c01f5b

File tree

45 files changed

+1110
-634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1110
-634
lines changed

.gitlab-ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ code_quality:
4343
- /^.*hotfix.*$/
4444

4545
tests&build:
46+
image: $CI_REGISTRY/integrator/devops/openjdk-17-slim-docker:d837de0d
4647
extends:
4748
- .test-gradle
4849
script:
@@ -55,17 +56,19 @@ tests&build:
5556
<<: *artifacts
5657

5758
tests&build_for_maven_central:
59+
image: $CI_REGISTRY/integrator/devops/openjdk-17-slim-docker:d837de0d
5860
extends:
5961
- .test-gradle
6062
script:
6163
- cat $we_maven_central_gpg | base64 --decode > "$(pwd)/we_maven_central.gpg"
6264
- ./gradlew --no-parallel -PsonaTypeMavenUser=$SONATYPE_USER -PsonaTypeMavenPassword=$SONATYPE_PASSWORD -Psigning.keyId=$SIGN_KEY_ID -Psigning.password=$SIGN_PASSWORD -Psigning.secretKeyRingFile="$(pwd)/we_maven_central.gpg" version check build publish --stacktrace
63-
- ./gradlew -PsonaTypeMavenUser=$SONATYPE_USER -PsonaTypeMavenPassword=$SONATYPE_PASSWORD closeAndReleaseRepository
65+
- ./gradlew -PsonaTypeMavenUser=$SONATYPE_USER -PsonaTypeMavenPassword=$SONATYPE_PASSWORD closeAndReleaseStagingRepository
6466
only:
6567
- master
6668
<<: *artifacts
6769

6870
tests-mr:
71+
image: $CI_REGISTRY/integrator/devops/openjdk-17-slim-docker:d837de0d
6972
extends:
7073
- .test-mr-gradle
7174
script:
@@ -78,4 +81,4 @@ tests-mr:
7881
- git merge origin/$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
7982
- ./gradlew -PweMavenUser=$MAVEN_USER -PweMavenPassword=$MAVEN_PASSWORD check build
8083
- docker images --format "{{json . }}" --no-trunc > images.json
81-
<<: *artifacts
84+
<<: *artifacts

build.gradle.kts

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
44
import org.gradle.api.tasks.testing.logging.TestLogEvent
55
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
66

7+
val detektVersion: String by project
8+
79
val kotlinVersion: String by project
810
val springBootVersion: String by project
9-
val springCloudVersion: String by project
1011
val jacocoToolVersion: String by project
1112
val logbackVersion: String by project
1213
val javaxAnnotationApiVersion: String by project
1314

14-
val junitPlatformLauncherVersion: String by project
15-
val junitBom: String by project
15+
val junitVersion: String by project
1616
val mockkVersion: String by project
1717
val springMockkVersion: String by project
1818

@@ -29,7 +29,6 @@ val gitHubProject: String by project
2929
val githubUrl: String by project
3030

3131
val feignVersion: String by project
32-
val jacksonModuleKotlin: String by project
3332

3433
val weNodeClientVersion: String by project
3534
val weContractSdkVersion: String by project
@@ -42,23 +41,29 @@ plugins {
4241
kotlin("jvm") apply false
4342
`maven-publish`
4443
signing
45-
id("io.codearte.nexus-staging")
44+
id("io.github.gradle-nexus.publish-plugin")
4645
kotlin("plugin.spring") apply false
4746
id("org.springframework.boot") apply false
4847
id("io.spring.dependency-management") apply false
49-
id("io.gitlab.arturbosch.detekt") apply false
50-
id("org.jlleitschuh.gradle.ktlint") apply false
48+
id("io.gitlab.arturbosch.detekt")
5149
id("com.palantir.git-version") apply false
5250
id("com.gorylenko.gradle-git-properties") apply false
5351
id("fr.brouillard.oss.gradle.jgitver")
5452
id("org.jetbrains.dokka")
5553
id("jacoco")
5654
}
5755

58-
nexusStaging {
59-
serverUrl = "$sonaTypeBasePath/service/local/"
60-
username = sonaTypeMavenUser
61-
password = sonaTypeMavenPassword
56+
if (sonaTypeMavenUser != null && sonaTypeMavenUser != null) {
57+
nexusPublishing {
58+
repositories {
59+
sonatype {
60+
nexusUrl.set(uri("$sonaTypeBasePath/service/local/"))
61+
snapshotRepositoryUrl.set(uri("$sonaTypeBasePath/content/repositories/snapshots/"))
62+
username.set(sonaTypeMavenUser)
63+
password.set(sonaTypeMavenPassword)
64+
}
65+
}
66+
}
6267
}
6368

6469
jgitver {
@@ -141,17 +146,19 @@ configure(
141146
apply(plugin = "kotlin")
142147
apply(plugin = "signing")
143148
apply(plugin = "io.gitlab.arturbosch.detekt")
144-
apply(plugin = "org.jlleitschuh.gradle.ktlint")
145149
apply(plugin = "jacoco")
146150
apply(plugin = "org.jetbrains.dokka")
147151

148-
val jacocoCoverageFile = "$buildDir/jacocoReports/test/jacocoTestReport.xml"
152+
dependencies {
153+
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion")
154+
}
149155

156+
val jacocoCoverageFile = layout.buildDirectory.file("jacocoReports/test/jacocoTestReport.xml").get().asFile
150157
tasks.withType<JacocoReport> {
151158
reports {
152159
xml.apply {
153160
required.set(true)
154-
outputLocation.set(file(jacocoCoverageFile))
161+
outputLocation.set(jacocoCoverageFile)
155162
}
156163
}
157164
}
@@ -181,6 +188,23 @@ configure(
181188
buildUponDefaultConfig = true
182189
}
183190

191+
tasks.register<Detekt>("detektFormat") {
192+
description = "Runs detekt with auto-correct to format the code."
193+
group = "formatting"
194+
autoCorrect = true
195+
exclude("resources/")
196+
exclude("build/")
197+
config.setFrom(detektConfigFilePath)
198+
setSource(
199+
files(
200+
"src/main/java",
201+
"src/test/java",
202+
"src/main/kotlin",
203+
"src/test/kotlin",
204+
)
205+
)
206+
}
207+
184208
val sourcesJar by tasks.creating(Jar::class) {
185209
group = JavaBasePlugin.DOCUMENTATION_GROUP
186210
description = "Assembles sources JAR"
@@ -262,7 +286,7 @@ configure(
262286
mavenBom("com.wavesenterprise:we-node-client-bom:$weNodeClientVersion")
263287
mavenBom("com.wavesenterprise:we-contract-sdk-bom:$weContractSdkVersion")
264288
mavenBom("io.github.openfeign:feign-bom:$feignVersion")
265-
mavenBom("org.junit:junit-bom:$junitBom")
289+
mavenBom("org.junit:junit-bom:$junitVersion")
266290
}
267291
dependencies {
268292
dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:$kotlinCoroutinesVersion")
@@ -274,12 +298,12 @@ configure(
274298
tasks.withType<KotlinCompile>().configureEach {
275299
kotlinOptions {
276300
freeCompilerArgs = listOf("-Xjsr305=strict")
277-
jvmTarget = JavaVersion.VERSION_1_8.toString()
301+
jvmTarget = JavaVersion.VERSION_17.toString()
278302
}
279303
}
280304

281305
jacoco {
282306
toolVersion = jacocoToolVersion
283-
reportsDirectory.set(file("$buildDir/jacocoReports"))
307+
reportsDirectory.set(layout.buildDirectory.dir("jacocoReports").get().asFile)
284308
}
285309
}

gradle.properties

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,33 @@ org.gradle.parallel=true
66
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
77

88
# Build plugins
9-
gradleDependencyManagementVersion=1.0.8.RELEASE
10-
detektVersion=1.19.0
11-
ktlintVersion=10.2.1
12-
gitPropertiesVersion=2.2.2
13-
palantirGitVersion=0.12.2
14-
jacocoToolVersion=0.8.7
9+
gradleDependencyManagementVersion=1.1.5
10+
detektVersion=1.23.6
11+
gitPropertiesVersion=2.4.1
12+
palantirGitVersion=3.1.0
13+
jacocoToolVersion=0.8.12
1514
jGitVerVersion=0.9.1
16-
dokkaVersion=1.6.21
17-
nexusStagingVersion=0.30.0
15+
dokkaVersion=1.9.20
16+
nexusPublishVersion=2.0.0
1817

1918
# Core infrastructure libs versions
20-
kotlinVersion=1.6.21
21-
springBootVersion=2.6.7
22-
springCloudVersion=2021.0.2
19+
kotlinVersion=1.9.23
20+
springBootVersion=3.3.0
2321
logbackVersion=1.2.11
2422
javaxAnnotationApiVersion=1.3.2
2523
aspectjVersion=1.9.19
26-
kotlinModuleVersion=2.13.2
27-
jacksonModuleKotlin=2.13.3
28-
feignVersion=11.10
29-
kotlinCoroutinesVersion=1.6.0
24+
kotlinModuleVersion=2.17.1
25+
feignVersion=13.2.1
26+
kotlinCoroutinesVersion=1.8.1
3027

3128
# Testing
32-
junitPlatformLauncherVersion=1.6.2
33-
mockkVersion=1.12.3
34-
springMockkVersion=3.1.1
35-
junitVersion=5.3.2
36-
junitBom=5.2.0
37-
assertjVersion=3.20.2
29+
junitVersion=5.10.2
30+
mockkVersion=1.13.11
31+
springMockkVersion=4.0.2
3832

3933
# WE SDK libs
40-
weNodeClientVersion=1.4.1
41-
weContractSdkVersion=1.3.4
34+
weNodeClientVersion=2.0.0
35+
weContractSdkVersion=2.0.0
4236

4337
# GitHub properties
4438
gitHubProject=waves-enterprise/we-spring-sdk

0 commit comments

Comments
 (0)