From d20fb3e5fa2c41b541407a5fb4a5a865d9cddf1f Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Fri, 22 Dec 2023 17:04:19 -0500 Subject: [PATCH] Refactor version props to dependencies.gradle This is what we need to satisfy Dependabot expectations --- build.gradle | 8 +++++--- common/aws-s3-common/build.gradle | 2 +- common/metadata-store-common/build.gradle | 8 ++------ common/tensorflow-common/build.gradle | 9 +++------ common/twitter-common/build.gradle | 6 +----- dependencies.gradle | 10 ++++++++++ function/twitter-function/build.gradle | 4 ---- gradle.properties | 8 -------- supplier/mail-supplier/build.gradle | 8 ++------ supplier/twitter-supplier/build.gradle | 4 ---- 10 files changed, 24 insertions(+), 43 deletions(-) create mode 100644 dependencies.gradle diff --git a/build.gradle b/build.gradle index 72aeee8b..5a05e8ce 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,8 @@ ext { javaProjects = subprojects - project(':function-dependencies') } +apply from: 'dependencies.gradle' + allprojects { group = 'org.springframework.cloud.fn' @@ -44,9 +46,9 @@ allprojects { } imports { - mavenBom "org.springframework.boot:spring-boot-dependencies:${property('spring-boot.version')}" - mavenBom "org.springframework.cloud:spring-cloud-dependencies:${property('spring-cloud.version')}" - mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:${property('spring-cloud-aws.version')}" + mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion" + mavenBom "org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion" + mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:$springCloudAwsVersion" } } diff --git a/common/aws-s3-common/build.gradle b/common/aws-s3-common/build.gradle index 2bd41efb..2713545c 100644 --- a/common/aws-s3-common/build.gradle +++ b/common/aws-s3-common/build.gradle @@ -1,5 +1,5 @@ dependencies { - api "org.springframework.integration:spring-integration-aws:${property('spring-integration-aws.version')}" + api "org.springframework.integration:spring-integration-aws:$springIntegrationAwsVersion" api 'io.awspring.cloud:spring-cloud-aws-starter-s3' api 'software.amazon.awssdk:aws-crt-client' api 'org.springframework.integration:spring-integration-file' diff --git a/common/metadata-store-common/build.gradle b/common/metadata-store-common/build.gradle index 5daa8f7d..8a31b083 100644 --- a/common/metadata-store-common/build.gradle +++ b/common/metadata-store-common/build.gradle @@ -1,7 +1,3 @@ -ext { - curatorVersion = '5.5.0' -} - dependencies { optionalApi 'org.springframework.integration:spring-integration-redis' optionalApi 'org.springframework.boot:spring-boot-starter-data-redis' @@ -12,9 +8,9 @@ dependencies { optionalApi 'io.awspring.cloud:spring-cloud-aws-starter' optionalApi 'org.springframework.integration:spring-integration-zookeeper' optionalApi 'org.springframework.integration:spring-integration-hazelcast' - optionalApi "org.springframework.integration:spring-integration-aws:${property('spring-integration-aws.version')}" + optionalApi "org.springframework.integration:spring-integration-aws:$springIntegrationAwsVersion" api 'software.amazon.awssdk:dynamodb' testImplementation 'org.hsqldb:hsqldb' - testImplementation "org.apache.curator:curator-test:$curatorVersion" + testImplementation 'org.apache.curator:curator-test:5.5.0' } diff --git a/common/tensorflow-common/build.gradle b/common/tensorflow-common/build.gradle index 6fdb6055..578ca802 100644 --- a/common/tensorflow-common/build.gradle +++ b/common/tensorflow-common/build.gradle @@ -1,15 +1,12 @@ ext { tensorflowVersion='1.15.0' - commonsCompressVersion='1.25.0' - commonsIoVersion='2.15.0' - pcollectionsVersion='4.0.1' } dependencies { api "org.tensorflow:tensorflow:$tensorflowVersion" api "org.tensorflow:proto:$tensorflowVersion" - api "org.apache.commons:commons-compress:$commonsCompressVersion" - api "commons-io:commons-io:$commonsIoVersion" + api 'org.apache.commons:commons-compress:1.25.0' + api 'commons-io:commons-io:2.15.0' api 'org.apache.commons:commons-lang3' - api "org.pcollections:pcollections:$pcollectionsVersion" + api 'org.pcollections:pcollections:4.0.1' } diff --git a/common/twitter-common/build.gradle b/common/twitter-common/build.gradle index 13052e01..a3bea0aa 100644 --- a/common/twitter-common/build.gradle +++ b/common/twitter-common/build.gradle @@ -1,8 +1,4 @@ -ext { - twitter4jVersion='4.0.7' -} - dependencies { - api "org.twitter4j:twitter4j-stream:$twitter4jVersion" + api 'org.twitter4j:twitter4j-stream:4.0.7' api 'org.springframework.integration:spring-integration-ip' } diff --git a/dependencies.gradle b/dependencies.gradle new file mode 100644 index 00000000..04edc863 --- /dev/null +++ b/dependencies.gradle @@ -0,0 +1,10 @@ +ext { + springBootVersion = '3.2.0' + springCloudVersion = '2023.0.0' + springCloudAwsVersion = '3.0.3' + springIntegrationAwsVersion = '3.0.4' + + debeziumVersion = '2.4.1.Final' + ftpServerVersion = '1.2.0' + mockserverVersion = '5.13.2' +} \ No newline at end of file diff --git a/function/twitter-function/build.gradle b/function/twitter-function/build.gradle index 40cddd80..92b49943 100644 --- a/function/twitter-function/build.gradle +++ b/function/twitter-function/build.gradle @@ -1,7 +1,3 @@ -ext { - mockserverVersion='5.13.2' -} - dependencies { api project(':twitter-common') diff --git a/gradle.properties b/gradle.properties index ff7b1ce6..98ca984b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,11 +3,3 @@ org.gradle.jvmargs=-Xmx1536M -Dfile.encoding=UTF-8 org.gradle.caching=true org.gradle.parallel=true -spring-boot.version=3.2.0 -spring-cloud.version=2023.0.0-SNAPSHOT -spring-cloud-aws.version=3.0.3 -spring-integration-aws.version=3.0.4 -angus-mail.version=2.0.2 - -debeziumVersion = 2.4.1.Final -ftpServerVersion=1.2.0 diff --git a/supplier/mail-supplier/build.gradle b/supplier/mail-supplier/build.gradle index fcb2668d..3086c68b 100644 --- a/supplier/mail-supplier/build.gradle +++ b/supplier/mail-supplier/build.gradle @@ -1,11 +1,7 @@ -ext { - greenmailVersion='2.1.0-alpha-3' -} - dependencies { api 'org.springframework.integration:spring-integration-mail' api 'org.springframework.boot:spring-boot-starter-mail' - api "org.eclipse.angus:jakarta.mail:${property('angus-mail.version')}" + api 'org.eclipse.angus:jakarta.mail:2.0.2' - testImplementation "com.icegreen:greenmail:$greenmailVersion" + testImplementation 'com.icegreen:greenmail:2.1.0-alpha-3' } diff --git a/supplier/twitter-supplier/build.gradle b/supplier/twitter-supplier/build.gradle index 6d0f4762..b26aa6dd 100644 --- a/supplier/twitter-supplier/build.gradle +++ b/supplier/twitter-supplier/build.gradle @@ -1,7 +1,3 @@ -ext { - mockserverVersion='5.13.2' -} - dependencies { api project(':twitter-common') api 'org.springframework.integration:spring-integration-jms'