Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dgeorgiev committed Jul 30, 2024
2 parents 20676c1 + 15c711a commit f87248b
Show file tree
Hide file tree
Showing 221 changed files with 1,773 additions and 1,122 deletions.
5 changes: 4 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ code_quality:
- /^.*hotfix.*$/

tests&build:
image: $CI_REGISTRY/integrator/devops/openjdk-17-slim-docker:d837de0d
extends:
- .test-gradle
script:
Expand All @@ -55,17 +56,19 @@ tests&build:
<<: *artifacts

tests&build_for_maven_central:
image: $CI_REGISTRY/integrator/devops/openjdk-17-slim-docker:d837de0d
extends:
- .test-gradle
script:
- cat $we_maven_central_gpg | base64 --decode > "$(pwd)/we_maven_central.gpg"
- ./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
- ./gradlew -PsonaTypeMavenUser=$SONATYPE_USER -PsonaTypeMavenPassword=$SONATYPE_PASSWORD closeAndReleaseRepository
- ./gradlew -PsonaTypeMavenUser=$SONATYPE_USER -PsonaTypeMavenPassword=$SONATYPE_PASSWORD closeAndReleaseStagingRepository
only:
- master
<<: *artifacts

tests-mr:
image: $CI_REGISTRY/integrator/devops/openjdk-17-slim-docker:d837de0d
extends:
- .test-mr-gradle
script:
Expand Down
53 changes: 36 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

val detektVersion: String by project

val kotlinVersion: String by project
val kotlinCoroutinesVersion: String by project
val reactorVersion: String by project
Expand All @@ -22,7 +24,6 @@ val reactorBomVersion: String by project
val junitVersion: String by project
val hamcrestVersion: String by project
val mockkVersion: String by project
val springMockkVersion: String by project
val wireMockVersion: String by project
val kotestVersion: String by project

Expand All @@ -47,21 +48,27 @@ plugins {
kotlin("jvm") apply false
`maven-publish`
signing
id("io.codearte.nexus-staging")
id("io.github.gradle-nexus.publish-plugin")
id("io.spring.dependency-management") apply false
id("io.gitlab.arturbosch.detekt") apply false
id("org.jlleitschuh.gradle.ktlint") apply false
id("io.gitlab.arturbosch.detekt")
id("com.palantir.git-version") apply false
id("com.gorylenko.gradle-git-properties") apply false
id("fr.brouillard.oss.gradle.jgitver")
id("org.jetbrains.dokka")
id("jacoco")
}

nexusStaging {
serverUrl = "$sonaTypeBasePath/service/local/"
username = sonaTypeMavenUser
password = sonaTypeMavenPassword
if (sonaTypeMavenUser != null && sonaTypeMavenUser != null) {
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("$sonaTypeBasePath/service/local/"))
snapshotRepositoryUrl.set(uri("$sonaTypeBasePath/content/repositories/snapshots/"))
username.set(sonaTypeMavenUser)
password.set(sonaTypeMavenPassword)
}
}
}
}

jgitver {
Expand Down Expand Up @@ -154,17 +161,20 @@ configure(
apply(plugin = "kotlin")
apply(plugin = "signing")
apply(plugin = "io.gitlab.arturbosch.detekt")
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "jacoco")
apply(plugin = "org.jetbrains.dokka")

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

val jacocoCoverageFile = layout.buildDirectory.dir("jacocoReports/test/jacocoTestReport.xml").get().asFile

tasks.withType<JacocoReport> {
reports {
xml.apply {
required.set(true)
outputLocation.set(file(jacocoCoverageFile))
outputLocation.set(jacocoCoverageFile)
}
}
}
Expand Down Expand Up @@ -194,6 +204,16 @@ configure(
buildUponDefaultConfig = true
}

tasks.register<Detekt>("detektFormat") {
description = "Runs detekt with auto-correct to format the code."
group = "formatting"
autoCorrect = true
exclude("resources/")
exclude("build/")
config.setFrom(detektConfigFilePath)
setSource(files("src/main/java", "src/main/kotlin"))
}

val sourcesJar by tasks.creating(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles sources JAR"
Expand Down Expand Up @@ -293,30 +313,29 @@ configure(
dependency("org.slf4j:slf4j-api:$slf4jVersion")
dependency("com.github.ben-manes.caffeine:caffeine:$caffeineCacheVersion")

dependency("org.bouncycastle:bcprov-jdk15on:$bouncycastleVersion")
dependency("org.bouncycastle:bcpkix-jdk15on:$bouncycastleVersion")
dependency("org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion")
dependency("org.bouncycastle:bcpkix-jdk18on:$bouncycastleVersion")

dependency("io.mockk:mockk:$mockkVersion")
dependency("com.ninja-squad:springmockk:$springMockkVersion")

dependency("org.hamcrest:hamcrest:$hamcrestVersion")
dependency("org.hamcrest:hamcrest-core:$hamcrestVersion")
dependency("org.hamcrest:hamcrest-library:$hamcrestVersion")

dependency("com.github.tomakehurst:wiremock-jre8:$wireMockVersion")
dependency("org.wiremock:wiremock:$wireMockVersion")
dependency("io.kotest:kotest-runner-junit5:$kotestVersion")
}
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = JavaVersion.VERSION_1_8.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}
}

jacoco {
toolVersion = jacocoToolVersion
reportsDirectory.set(file("$buildDir/jacocoReports"))
reportsDirectory.set(layout.buildDirectory.dir("jacocoReports").get().asFile)
}
}
48 changes: 22 additions & 26 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
kotlin.code.style=official

# Build parameters
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# Build plugins
gradleDependencyManagementVersion=1.0.8.RELEASE
detektVersion=1.19.0
ktlintVersion=10.2.1
gitPropertiesVersion=2.2.2
palantirGitVersion=0.12.2
jacocoToolVersion=0.8.7
gradleDependencyManagementVersion=1.1.5
detektVersion=1.23.6
gitPropertiesVersion=2.4.1
palantirGitVersion=3.1.0
jacocoToolVersion=0.8.12
jGitVerVersion=0.9.1
dokkaVersion=1.6.21
nexusStagingVersion=0.30.0
dokkaVersion=1.9.20
nexusStagingVersion=2.0.0

# Core infrastructure libs versions
kotlinVersion=1.6.21
kotlinCoroutinesVersion=1.6.1
ktorVersion=2.0.1
reactorBomVersion=2020.0.18
kotlinVersion=1.9.23
kotlinCoroutinesVersion=1.8.1
ktorVersion=2.3.11
reactorBomVersion=2023.0.7
logbackVersion=1.2.11
javaxAnnotationApiVersion=1.3.2
caffeineCacheVersion=2.9.3
slf4jVersion=1.7.36
bouncycastleVersion=1.60
bouncycastleVersion=1.78.1

# http
feignVersion=11.10
jacksonVersion=2.13.3
feignVersion=13.2.1
jacksonVersion=2.17.1

# Grpc
ioGrpcVersion=1.20.0
ioGrpcKotlinVersion=1.2.1
protobufVersion=3.24.0
protobufPluginVersion=0.8.18
ioGrpcVersion=1.64.0
ioGrpcKotlinVersion=1.4.1
protobufVersion=3.25.3
protobufPluginVersion=0.9.4

# Testing
junitVersion=5.8.2
junitVersion=5.10.2
hamcrestVersion=2.2
mockkVersion=1.12.3
springMockkVersion=3.1.1
wireMockVersion=2.33.2
kotestVersion=5.0.0
mockkVersion=1.13.11
wireMockVersion=3.6.0
kotestVersion=5.9.1

# Publishing values
githubUrl=https://github.com/waves-enterprise/
Expand Down
Loading

0 comments on commit f87248b

Please sign in to comment.