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 31, 2024
2 parents f321924 + 5c46500 commit 6c01f5b
Show file tree
Hide file tree
Showing 45 changed files with 1,110 additions and 634 deletions.
7 changes: 5 additions & 2 deletions .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 --stacktrace
- ./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 All @@ -78,4 +81,4 @@ tests-mr:
- git merge origin/$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
- ./gradlew -PweMavenUser=$MAVEN_USER -PweMavenPassword=$MAVEN_PASSWORD check build
- docker images --format "{{json . }}" --no-trunc > images.json
<<: *artifacts
<<: *artifacts
58 changes: 41 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ 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 springBootVersion: String by project
val springCloudVersion: String by project
val jacocoToolVersion: String by project
val logbackVersion: String by project
val javaxAnnotationApiVersion: String by project

val junitPlatformLauncherVersion: String by project
val junitBom: String by project
val junitVersion: String by project
val mockkVersion: String by project
val springMockkVersion: String by project

Expand All @@ -29,7 +29,6 @@ val gitHubProject: String by project
val githubUrl: String by project

val feignVersion: String by project
val jacksonModuleKotlin: String by project

val weNodeClientVersion: String by project
val weContractSdkVersion: String by project
Expand All @@ -42,23 +41,29 @@ plugins {
kotlin("jvm") apply false
`maven-publish`
signing
id("io.codearte.nexus-staging")
id("io.github.gradle-nexus.publish-plugin")
kotlin("plugin.spring") apply false
id("org.springframework.boot") apply false
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 @@ -141,17 +146,19 @@ 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.file("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 @@ -181,6 +188,23 @@ 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/test/java",
"src/main/kotlin",
"src/test/kotlin",
)
)
}

val sourcesJar by tasks.creating(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles sources JAR"
Expand Down Expand Up @@ -262,7 +286,7 @@ configure(
mavenBom("com.wavesenterprise:we-node-client-bom:$weNodeClientVersion")
mavenBom("com.wavesenterprise:we-contract-sdk-bom:$weContractSdkVersion")
mavenBom("io.github.openfeign:feign-bom:$feignVersion")
mavenBom("org.junit:junit-bom:$junitBom")
mavenBom("org.junit:junit-bom:$junitVersion")
}
dependencies {
dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:$kotlinCoroutinesVersion")
Expand All @@ -274,12 +298,12 @@ configure(
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)
}
}
40 changes: 17 additions & 23 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,33 @@ 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
nexusPublishVersion=2.0.0

# Core infrastructure libs versions
kotlinVersion=1.6.21
springBootVersion=2.6.7
springCloudVersion=2021.0.2
kotlinVersion=1.9.23
springBootVersion=3.3.0
logbackVersion=1.2.11
javaxAnnotationApiVersion=1.3.2
aspectjVersion=1.9.19
kotlinModuleVersion=2.13.2
jacksonModuleKotlin=2.13.3
feignVersion=11.10
kotlinCoroutinesVersion=1.6.0
kotlinModuleVersion=2.17.1
feignVersion=13.2.1
kotlinCoroutinesVersion=1.8.1

# Testing
junitPlatformLauncherVersion=1.6.2
mockkVersion=1.12.3
springMockkVersion=3.1.1
junitVersion=5.3.2
junitBom=5.2.0
assertjVersion=3.20.2
junitVersion=5.10.2
mockkVersion=1.13.11
springMockkVersion=4.0.2

# WE SDK libs
weNodeClientVersion=1.4.1
weContractSdkVersion=1.3.4
weNodeClientVersion=2.0.0
weContractSdkVersion=2.0.0

# GitHub properties
gitHubProject=waves-enterprise/we-spring-sdk
Expand Down
Loading

0 comments on commit 6c01f5b

Please sign in to comment.