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 9b564f5 + e1af258 commit a439016
Show file tree
Hide file tree
Showing 20 changed files with 984 additions and 539 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ tests&build_for_maven_central:
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
Expand Down
52 changes: 37 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

val kotlinVersion: String by project
val jacocoToolVersion: String by project
val detektVersion: String by project

Expand All @@ -28,21 +27,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 @@ -136,17 +141,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 @@ -176,6 +183,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,18 +286,16 @@ configure(
mavenBom("com.fasterxml.jackson:jackson-bom:$jacksonVersion")
mavenBom("com.wavesenterprise:we-contract-sdk-bom:$weSdkContractVersion")
mavenBom("com.wavesenterprise:we-node-client-bom:$weNodeClientVersion")
mavenBom("org.junit:junit-bom:$junitVersion")
}
dependencies {
dependency("io.mockk:mockk:$mockkVersion")
dependency("org.junit.jupiter:junit-jupiter-api:$junitVersion")
dependency("org.junit.jupiter:junit-jupiter-params:$junitVersion")
dependency("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
}
}

jacoco {
toolVersion = jacocoToolVersion
reportsDirectory.set(file("$buildDir/jacocoReports"))
reportsDirectory.set(layout.buildDirectory.dir("jacocoReports").get().asFile)
}

tasks.withType<KotlinCompile>().configureEach {
Expand Down
27 changes: 13 additions & 14 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,26 @@ org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# Build plugins
gradleDependencyManagementVersion=1.1.4
detektVersion=1.19.0
ktlintVersion=10.2.1
gitPropertiesVersion=2.2.2
palantirGitVersion=0.12.2
jacocoToolVersion=0.8.10
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.9.10
nexusStagingVersion=0.30.0
dokkaVersion=1.9.20
nexusPublishVersion=2.0.0

# Core infrastructure libs versions
kotlinVersion=1.9.10
jacksonVersion=2.13.3
kotlinVersion=1.9.23
jacksonVersion=2.17.1

# Testing
mockkVersion=1.12.3
junitVersion=5.8.2
mockkVersion=1.13.11
junitVersion=5.10.2

# Waves Enterprise versions
weNodeClientVersion=1.4.1
weSdkContractVersion=1.3.4
weNodeClientVersion=2.0.0
weSdkContractVersion=2.0.0

# Libs paths
weMavenBasePath=https://artifacts.wavesenterprise.com/repository/
Expand Down
Loading

0 comments on commit a439016

Please sign in to comment.