diff --git a/application/build.gradle b/application/build.gradle index 256b67fc..e98fcab4 100644 --- a/application/build.gradle +++ b/application/build.gradle @@ -13,8 +13,8 @@ dependencies { runtimeOnly 'org.postgresql:postgresql' runtimeOnly 'org.flywaydb:flyway-core' runtimeOnly 'com.h2database:h2' - integrationTestImplementation 'com.ryantenney.metrics:metrics-spring:3.1.3' - integrationTestImplementation 'io.grpc:grpc-stub:1.45.1' + integrationTestImplementation 'com.ryantenney.metrics:metrics-spring' + integrationTestImplementation 'io.grpc:grpc-stub' integrationTestImplementation project(':backend') integrationTestImplementation project(':grpc-adapter') } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index bf3e7197..d5a2e66a 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -7,11 +7,13 @@ repositories { } dependencies { - implementation 'de.aaschmid:gradle-cpd-plugin:3.3' - implementation 'net.ltgt.gradle:gradle-errorprone-plugin:3.0.1' - implementation 'net.ltgt.gradle:gradle-nullaway-plugin:1.4.0' - implementation 'com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.13' - implementation 'org.springframework.boot:spring-boot-gradle-plugin:2.7.5' - implementation 'com.adarshr:gradle-test-logger-plugin:3.2.0' - implementation 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.9.0' + implementation platform('de.cotto.lndmanagej:platform') + implementation 'de.aaschmid:gradle-cpd-plugin' + implementation 'net.ltgt.gradle:gradle-errorprone-plugin' + implementation 'net.ltgt.gradle:gradle-nullaway-plugin' + implementation 'com.github.spotbugs.snom:spotbugs-gradle-plugin' + implementation 'org.springframework.boot:spring-boot-gradle-plugin' + implementation 'com.adarshr:gradle-test-logger-plugin' + implementation 'info.solidsoft.gradle.pitest:gradle-pitest-plugin' + implementation 'com.google.protobuf:protobuf-gradle-plugin' } diff --git a/buildSrc/src/main/groovy/lnd-manageJ.checkstyle.gradle b/buildSrc/src/main/groovy/lnd-manageJ.checkstyle.gradle index 477b7863..69262287 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.checkstyle.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.checkstyle.gradle @@ -3,6 +3,5 @@ plugins { } checkstyle { - toolVersion '10.3.1' maxWarnings = 0 } diff --git a/buildSrc/src/main/groovy/lnd-manageJ.cpd.gradle b/buildSrc/src/main/groovy/lnd-manageJ.cpd.gradle index 6ab5868b..1335ce45 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.cpd.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.cpd.gradle @@ -2,7 +2,3 @@ plugins { id 'de.aaschmid.cpd' } check.dependsOn cpdCheck - -cpd { - toolVersion = '6.51.0' -} diff --git a/buildSrc/src/main/groovy/lnd-manageJ.errorprone.gradle b/buildSrc/src/main/groovy/lnd-manageJ.errorprone.gradle index e923d3b6..c510342f 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.errorprone.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.errorprone.gradle @@ -6,8 +6,9 @@ plugins { } dependencies { - errorprone 'com.google.errorprone:error_prone_core:2.14.0' - errorprone 'com.uber.nullaway:nullaway:0.9.8' + errorprone platform('de.cotto.lndmanagej:platform') + errorprone 'com.google.errorprone:error_prone_core' + errorprone 'com.uber.nullaway:nullaway' } nullaway { diff --git a/buildSrc/src/main/groovy/lnd-manageJ.integration-tests.gradle b/buildSrc/src/main/groovy/lnd-manageJ.integration-tests.gradle index 58643247..ab522ce9 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.integration-tests.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.integration-tests.gradle @@ -8,8 +8,9 @@ testing { testType = TestSuiteType.INTEGRATION_TEST dependencies { implementation project - implementation 'com.tngtech.archunit:archunit:1.0.0' - implementation 'org.awaitility:awaitility:4.2.0' + implementation project.dependencies.platform('de.cotto.lndmanagej:platform') + implementation 'com.tngtech.archunit:archunit' + implementation 'org.awaitility:awaitility' } targets { diff --git a/buildSrc/src/main/groovy/lnd-manageJ.jacoco.gradle b/buildSrc/src/main/groovy/lnd-manageJ.jacoco.gradle index cfb0cf16..c79dbec6 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.jacoco.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.jacoco.gradle @@ -47,7 +47,3 @@ jacocoTestCoverageVerification { } } } - -jacoco { - toolVersion = '0.8.8' -} diff --git a/buildSrc/src/main/groovy/lnd-manageJ.java-conventions.gradle b/buildSrc/src/main/groovy/lnd-manageJ.java-conventions.gradle index d3e2d1d1..620df74e 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.java-conventions.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.java-conventions.gradle @@ -12,6 +12,7 @@ plugins { id 'io.spring.dependency-management' id 'java-test-fixtures' id 'lnd-manageJ.spotbugs' + id 'lnd-manageJ.versions' } java { @@ -31,10 +32,11 @@ tasks.withType(JavaCompile).configureEach { } dependencies { + implementation platform('de.cotto.lndmanagej:platform') implementation 'org.springframework.boot:spring-boot-starter' - implementation 'org.apache.commons:commons-lang3:3.12.0' - implementation 'com.google.code.findbugs:jsr305:3.0.2' - implementation 'io.dropwizard.metrics:metrics-core:4.2.10' - implementation 'com.ryantenney.metrics:metrics-spring:3.1.3' - implementation 'com.google.guava:guava:31.1-jre' + implementation 'org.apache.commons:commons-lang3' + implementation 'com.google.code.findbugs:jsr305' + implementation 'io.dropwizard.metrics:metrics-core' + implementation 'com.ryantenney.metrics:metrics-spring' + implementation 'com.google.guava:guava' } diff --git a/buildSrc/src/main/groovy/lnd-manageJ.mutationtests.gradle b/buildSrc/src/main/groovy/lnd-manageJ.mutationtests.gradle index 93e1519a..d4f742cc 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.mutationtests.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.mutationtests.gradle @@ -1,3 +1,5 @@ +import info.solidsoft.gradle.pitest.PitestTask + plugins { id 'lnd-manageJ.tests' id 'info.solidsoft.pitest' @@ -5,8 +7,6 @@ plugins { pitest { targetClasses = ['de.cotto.*'] - pitestVersion = '1.9.3' - junit5PluginVersion = '1.0.0' outputFormats = ['XML', 'HTML'] timestampedReports = false failWhenNoMutations = false @@ -15,6 +15,6 @@ pitest { testStrengthThreshold = 100 } -tasks.withType(info.solidsoft.gradle.pitest.PitestTask).configureEach { +tasks.withType(PitestTask).configureEach { dependsOn test } diff --git a/buildSrc/src/main/groovy/lnd-manageJ.pmd.gradle b/buildSrc/src/main/groovy/lnd-manageJ.pmd.gradle index abefd086..a256be9a 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.pmd.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.pmd.gradle @@ -6,7 +6,6 @@ pmd { ruleSetFiles = files("${rootDir}/config/pmd-ruleset.xml") ruleSets = [] consoleOutput = true - toolVersion = '6.51.0' } tasks.withType(Test).forEach { testTask -> tasks.withType(Pmd).forEach { pmdTask -> diff --git a/buildSrc/src/main/groovy/lnd-manageJ.tests.gradle b/buildSrc/src/main/groovy/lnd-manageJ.tests.gradle index 10d2cd51..e67ef426 100644 --- a/buildSrc/src/main/groovy/lnd-manageJ.tests.gradle +++ b/buildSrc/src/main/groovy/lnd-manageJ.tests.gradle @@ -8,8 +8,8 @@ testing { test { useJUnitJupiter() dependencies { - implementation 'nl.jqno.equalsverifier:equalsverifier:3.10.1' - implementation 'uk.org.lidalia:slf4j-test:1.2.0' + implementation 'nl.jqno.equalsverifier:equalsverifier' + implementation 'uk.org.lidalia:slf4j-test' configurations.getByName('testRuntimeOnly').exclude group: 'ch.qos.logback', module: 'logback-classic' configurations.getByName('testRuntimeOnly').exclude group: 'org.slf4j', module: 'slf4j-nop' } diff --git a/buildSrc/src/main/groovy/lnd-manageJ.versions.gradle b/buildSrc/src/main/groovy/lnd-manageJ.versions.gradle new file mode 100644 index 00000000..60a83e75 --- /dev/null +++ b/buildSrc/src/main/groovy/lnd-manageJ.versions.gradle @@ -0,0 +1,16 @@ +checkstyle { + toolVersion '10.3.1' +} +cpd { + toolVersion = '6.51.0' +} +pmd { + toolVersion = '6.51.0' +} +jacoco { + toolVersion = '0.8.8' +} +pitest { + pitestVersion = '1.9.3' + junit5PluginVersion = '1.0.0' +} diff --git a/caching/build.gradle b/caching/build.gradle index 1f9324ae..766d4f6f 100644 --- a/caching/build.gradle +++ b/caching/build.gradle @@ -3,9 +3,9 @@ plugins { } dependencies { - api 'com.github.ben-manes.caffeine:caffeine:3.0.4' + api 'com.github.ben-manes.caffeine:caffeine' } pitest { testStrengthThreshold = 90 -} \ No newline at end of file +} diff --git a/configuration/build.gradle b/configuration/build.gradle index 0b4af5ff..fd1feead 100644 --- a/configuration/build.gradle +++ b/configuration/build.gradle @@ -5,6 +5,6 @@ plugins { dependencies { implementation project(':model') implementation project(':caching') - implementation 'org.ini4j:ini4j:0.5.4' + implementation 'org.ini4j:ini4j' testImplementation testFixtures(project(':model')) -} \ No newline at end of file +} diff --git a/grpc-adapter/build.gradle b/grpc-adapter/build.gradle index 8e712af8..3ff6e60c 100644 --- a/grpc-adapter/build.gradle +++ b/grpc-adapter/build.gradle @@ -7,7 +7,7 @@ dependencies { implementation project(':grpc-client') implementation project(':configuration') implementation project(':model') - testImplementation 'org.awaitility:awaitility:4.1.1' + testImplementation 'org.awaitility:awaitility' testImplementation testFixtures(project(':model')) } diff --git a/grpc-client/build.gradle b/grpc-client/build.gradle index 27dd8347..9d596908 100644 --- a/grpc-client/build.gradle +++ b/grpc-client/build.gradle @@ -1,14 +1,16 @@ plugins { id 'java-library' - id 'com.google.protobuf' version '0.8.18' + id 'com.google.protobuf' } dependencies { - api 'io.grpc:grpc-stub:1.45.1' - api 'io.grpc:grpc-protobuf:1.45.1' - implementation 'io.grpc:grpc-netty:1.45.1' - implementation 'commons-codec:commons-codec:1.13' - implementation 'javax.annotation:javax.annotation-api:1.3.2' + api platform('de.cotto.lndmanagej:platform') + protobuf platform('de.cotto.lndmanagej:platform') + api 'io.grpc:grpc-stub' + api 'io.grpc:grpc-protobuf' + implementation 'io.grpc:grpc-netty' + implementation 'commons-codec:commons-codec' + implementation 'javax.annotation:javax.annotation-api' } protobuf { @@ -45,4 +47,4 @@ java { repositories { mavenCentral() -} \ No newline at end of file +} diff --git a/pickhardt-payments/build.gradle b/pickhardt-payments/build.gradle index d4eee509..5341b2ba 100644 --- a/pickhardt-payments/build.gradle +++ b/pickhardt-payments/build.gradle @@ -8,10 +8,10 @@ dependencies { implementation project(':configuration') implementation project(':model') implementation project(':grpc-adapter') - implementation 'com.google.ortools:ortools-java:9.3.10497' - implementation 'org.eclipse.collections:eclipse-collections:11.0.0' + implementation 'com.google.ortools:ortools-java' + implementation 'org.eclipse.collections:eclipse-collections' testImplementation testFixtures(project(':model')) - testImplementation 'org.awaitility:awaitility:4.1.1' + testImplementation 'org.awaitility:awaitility' integrationTestImplementation project(':backend') integrationTestImplementation project(':grpc-adapter') integrationTestImplementation testFixtures(project(':model')) diff --git a/platform/build.gradle b/platform/build.gradle new file mode 100644 index 00000000..7ee42dbc --- /dev/null +++ b/platform/build.gradle @@ -0,0 +1,47 @@ +plugins { + id 'java-platform' +} + +group = 'de.cotto.lndmanagej' + +javaPlatform { + allowDependencies() +} + +dependencies { + api platform('org.springframework.cloud:spring-cloud-dependencies:2021.0.3') + + constraints { + api 'com.adarshr:gradle-test-logger-plugin:3.2.0' + api 'com.github.ben-manes.caffeine:caffeine:3.0.4' + api 'com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.13' + api 'com.google.code.findbugs:jsr305:3.0.2' + api 'com.google.errorprone:error_prone_core:2.14.0' + api 'com.google.guava:guava:31.1-jre' + api 'com.google.ortools:ortools-java:9.3.10497' + api 'com.ryantenney.metrics:metrics-spring:3.1.3' + api 'com.tngtech.archunit:archunit:1.0.0' + api 'com.uber.nullaway:nullaway:0.9.8' + api 'commons-codec:commons-codec:1.13' + api 'de.aaschmid:gradle-cpd-plugin:3.3' + api 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.9.0' + api 'io.dropwizard.metrics:metrics-core:4.2.10' + api 'io.github.resilience4j:resilience4j-spring-boot2:1.7.1' + api 'io.grpc:grpc-netty:1.45.1' + api 'io.grpc:grpc-protobuf:1.45.1' + api 'io.grpc:grpc-stub:1.45.1' + api 'javax.annotation:javax.annotation-api:1.3.2' + api 'net.ltgt.gradle:gradle-errorprone-plugin:3.0.1' + api 'net.ltgt.gradle:gradle-nullaway-plugin:1.4.0' + api 'nl.jqno.equalsverifier:equalsverifier:3.10.1' + api 'org.apache.commons:commons-lang3:3.12.0' + api 'org.awaitility:awaitility:4.2.0' + api 'org.eclipse.collections:eclipse-collections:11.0.0' + api 'org.ini4j:ini4j:0.5.4' + api 'org.springframework.boot:spring-boot-gradle-plugin:2.7.5' + api 'org.webjars:bootstrap:5.2.0' + api 'org.webjars:webjars-locator:0.45' + api 'uk.org.lidalia:slf4j-test:1.2.0' + api 'com.google.protobuf:protobuf-gradle-plugin:0.8.18' + } +} diff --git a/settings.gradle b/settings.gradle index 57640ab0..0950c03d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -19,3 +19,7 @@ include 'ui-demo' include 'grpc-adapter' include 'grpc-client' include 'application' + +dependencyResolutionManagement { + includeBuild('platform/') +} diff --git a/transactions/build.gradle b/transactions/build.gradle index 7ec8a35d..1dc8c0d9 100644 --- a/transactions/build.gradle +++ b/transactions/build.gradle @@ -2,16 +2,11 @@ plugins { id 'lnd-manageJ.java-library-conventions' } -ext { - set('springCloudVersion', '2021.0.3') -} - dependencies { - api platform("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}") implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'io.github.resilience4j:resilience4j-spring-boot2:1.7.1' + implementation 'io.github.resilience4j:resilience4j-spring-boot2' implementation 'com.fasterxml.jackson.core:jackson-databind' implementation project(':model') implementation project(':caching') diff --git a/ui/build.gradle b/ui/build.gradle index 50524952..b69ee3da 100644 --- a/ui/build.gradle +++ b/ui/build.gradle @@ -5,8 +5,8 @@ plugins { dependencies { implementation('org.springframework.boot:spring-boot-starter-web') implementation('org.springframework.boot:spring-boot-starter-thymeleaf') - implementation 'org.webjars:webjars-locator:0.45' - implementation 'org.webjars:bootstrap:5.2.0' + implementation 'org.webjars:webjars-locator' + implementation 'org.webjars:bootstrap' implementation project(':backend') implementation project(':model') implementation project(':web') diff --git a/web/build.gradle b/web/build.gradle index 23443617..3ad16f5c 100644 --- a/web/build.gradle +++ b/web/build.gradle @@ -9,7 +9,7 @@ dependencies { implementation project(':model') testImplementation testFixtures(project(':model')) testImplementation testFixtures(project(':pickhardt-payments')) - integrationTestImplementation 'com.ryantenney.metrics:metrics-spring:3.1.3' + integrationTestImplementation 'com.ryantenney.metrics:metrics-spring' integrationTestImplementation('org.springframework.boot:spring-boot-starter-web') integrationTestImplementation project(':backend') integrationTestImplementation project(':grpc-adapter')