From a0f43123b6f8b11c400e5cd5398aeb75d6addaee Mon Sep 17 00:00:00 2001 From: Juan C Galvis <8420868+juancgalvis@users.noreply.github.com> Date: Thu, 29 Jun 2023 15:21:27 -0500 Subject: [PATCH] Update dependencies --- .github/workflows/gradle.yml | 4 +- README.md | 6 +-- build.gradle | 6 +-- configuration/centralized-cache/build.gradle | 2 +- configuration/hybrid-cache/build.gradle | 2 +- domain/usecase/build.gradle | 2 +- gradle.properties | 4 +- gradle/wrapper/gradle-wrapper.properties | 2 +- .../driven-adapters/redis-stash/build.gradle | 2 +- main.gradle | 50 +++++++++++-------- 10 files changed, 44 insertions(+), 36 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 09a34c2..f471893 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -38,9 +38,9 @@ jobs: - name: Push codeCoverage to Codecov if: endsWith(github.REF, '/master') == true run: bash <(curl -s https://codecov.io/bash) - - name: Run sonarqube + - name: Run sonar if: endsWith(github.REF, '/master') == true - run: ./gradlew sonarqube --stacktrace + run: ./gradlew sonar --stacktrace -Dsonar.login=${{ secrets.SONAR_TOKEN }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 1b0bb92..5bbf5a8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ For local cache only ```gradle dependencies { - implementation 'com.github.bancolombia:bin-stash-local:1.1.0' + implementation 'com.github.bancolombia:bin-stash-local:1.2.0' } ``` @@ -27,7 +27,7 @@ For a centralized (redis) cache only ```gradle dependencies { - implementation 'com.github.bancolombia:bin-stash-centralized:1.1.0' + implementation 'com.github.bancolombia:bin-stash-centralized:1.2.0' } ``` @@ -35,7 +35,7 @@ For an hybrid (local and centralized) cache ```gradle dependencies { - implementation 'com.github.bancolombia:bin-stash-hybrid:1.1.0' + implementation 'com.github.bancolombia:bin-stash-hybrid:1.2.0' } ``` diff --git a/build.gradle b/build.gradle index f39c736..2bc98f9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ buildscript { ext { - springBootVersion = '3.0.5' + springBootVersion = '3.1.1' jacocoVersion = '0.8.7' } @@ -11,12 +11,12 @@ buildscript { dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") - classpath("org.owasp:dependency-check-gradle:8.2.1") + classpath("org.owasp:dependency-check-gradle:8.3.1") } } plugins { - id 'org.sonarqube' version '3.0' + id 'org.sonarqube' version '4.2.1.3168' id "io.github.gradle-nexus.publish-plugin" version "1.1.0" } diff --git a/configuration/centralized-cache/build.gradle b/configuration/centralized-cache/build.gradle index bd5bafd..5aa072f 100644 --- a/configuration/centralized-cache/build.gradle +++ b/configuration/centralized-cache/build.gradle @@ -5,6 +5,6 @@ dependencies { implementation 'org.springframework:spring-context' implementation 'com.fasterxml.jackson.core:jackson-databind' testImplementation 'org.springframework:spring-test' - testImplementation 'com.github.kstyrc:embedded-redis:0.6' + testImplementation "com.github.kstyrc:embedded-redis:${embeddedRedis}" } diff --git a/configuration/hybrid-cache/build.gradle b/configuration/hybrid-cache/build.gradle index c347d75..e113097 100644 --- a/configuration/hybrid-cache/build.gradle +++ b/configuration/hybrid-cache/build.gradle @@ -6,6 +6,6 @@ dependencies { implementation 'org.springframework:spring-context' implementation 'com.fasterxml.jackson.core:jackson-databind' testImplementation 'org.springframework:spring-test' - testImplementation 'com.github.kstyrc:embedded-redis:0.6' + testImplementation "com.github.kstyrc:embedded-redis:${embeddedRedis}" } diff --git a/domain/usecase/build.gradle b/domain/usecase/build.gradle index f7e7117..012427f 100644 --- a/domain/usecase/build.gradle +++ b/domain/usecase/build.gradle @@ -2,5 +2,5 @@ dependencies { api project(':bin-stash-model') implementation 'org.apache.commons:commons-lang3' implementation 'com.fasterxml.jackson.core:jackson-databind' - testImplementation 'com.google.re2j:re2j:1.6' + testImplementation "com.google.re2j:re2j:${re2j}" } diff --git a/gradle.properties b/gradle.properties index 2ffeae7..657021d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,5 @@ -version=1.1.0 +version=1.2.0 +re2j=1.7 +embeddedRedis=0.6 toPublish=bin-stash-model,bin-stash-usecase,bin-stash-memory,bin-stash-redis,bin-stash-local,bin-stash-centralized,bin-stash-hybrid org.gradle.daemon=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f398c33..37aef8d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/infrastructure/driven-adapters/redis-stash/build.gradle b/infrastructure/driven-adapters/redis-stash/build.gradle index 7e5ffe5..78a906c 100644 --- a/infrastructure/driven-adapters/redis-stash/build.gradle +++ b/infrastructure/driven-adapters/redis-stash/build.gradle @@ -2,5 +2,5 @@ dependencies { implementation project(':bin-stash-model') implementation 'io.lettuce:lettuce-core' implementation 'org.apache.commons:commons-lang3' - testImplementation 'com.github.kstyrc:embedded-redis:0.6' + testImplementation "com.github.kstyrc:embedded-redis:${embeddedRedis}" } diff --git a/main.gradle b/main.gradle index 151643c..8005bec 100644 --- a/main.gradle +++ b/main.gradle @@ -58,10 +58,10 @@ subprojects { testImplementation(platform('org.junit:junit-bom:5.7.0')) implementation 'io.projectreactor:reactor-core' - compileOnly 'org.projectlombok:lombok:1.18.24' - annotationProcessor 'org.projectlombok:lombok:1.18.24' - testCompileOnly 'org.projectlombok:lombok:1.18.24' - testAnnotationProcessor 'org.projectlombok:lombok:1.18.24' + compileOnly 'org.projectlombok:lombok:1.18.28' + annotationProcessor 'org.projectlombok:lombok:1.18.28' + testCompileOnly 'org.projectlombok:lombok:1.18.28' + testAnnotationProcessor 'org.projectlombok:lombok:1.18.28' testImplementation 'io.projectreactor:reactor-test' testImplementation('org.junit.jupiter:junit-jupiter') @@ -69,10 +69,10 @@ subprojects { testImplementation 'org.mockito:mockito-junit-jupiter:3.7.7' } - configurations.all { + configurations.configureEach { resolutionStrategy.eachDependency { DependencyResolveDetails details -> if (details.requested.group == 'org.apache.logging.log4j') { - details.useVersion '2.19.0' + details.useVersion '2.20.0' } } } @@ -80,7 +80,6 @@ subprojects { dependencyManagement { imports { mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}" - //mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" } } @@ -96,10 +95,10 @@ subprojects { jacocoTestReport { dependsOn test reports { - xml.enabled true - xml.destination file("${buildDir}/reports/jacoco.xml") - csv.enabled false - html.destination file("${buildDir}/reports/jacocoHtml") + xml.setRequired true + xml.setOutputLocation file("${buildDir}/reports/jacoco.xml") + csv.setRequired false + html.setOutputLocation file("${buildDir}/reports/jacocoHtml") } } compileJava { @@ -121,14 +120,16 @@ subprojects { apply plugin: "maven-publish" apply plugin: "signing" - task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + tasks.register('sourcesJar', Jar) { + dependsOn classes + archiveClassifier = 'sources' from sourceSets.main.allSource } javadoc.failOnError = false - task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + tasks.register('javadocJar', Jar) { + dependsOn javadoc + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -137,7 +138,7 @@ subprojects { archives javadocJar } - tasks.withType(GenerateModuleMetadata) { + tasks.withType(GenerateModuleMetadata).configureEach { enabled = false } @@ -189,17 +190,22 @@ subprojects { } -task generateMergedReport(type: JacocoReport) { - dependsOn = subprojects.test +tasks.register('generateMergedReport', JacocoReport) { + dependsOn test + dependsOn subprojects.test + dependsOn subprojects.javadoc + dependsOn subprojects.jacocoTestReport additionalSourceDirs.setFrom files(subprojects.sourceSets.main.allSource.srcDirs) sourceDirectories.setFrom files(subprojects.sourceSets.main.allSource.srcDirs) classDirectories.setFrom files(subprojects.sourceSets.main.output) executionData.setFrom project.fileTree(dir: '.', include: '**/build/jacoco/test.exec') reports { - xml.enabled true - csv.enabled false - html.enabled true + xml.setRequired true + csv.setRequired false + html.setRequired true } } - +tasks.named('wrapper') { + gradleVersion = '8.1.1' +}