Skip to content

Commit e377067

Browse files
author
Erin
committed
Added a utils.kt in buildSrc for global Versions of dependencies. Replaced any dependency used more than once with variable.
1 parent f7865ab commit e377067

File tree

4 files changed

+34
-19
lines changed

4 files changed

+34
-19
lines changed

buildSrc/src/main/kotlin/utils.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
object Versions {
3+
const val DEFAULT: String = "0.0.0"
4+
5+
const val CONFLUENT: String = "5.3.0" //"7.0.0"
6+
const val KAFKA: String = "2.3.0" // 3.1.0
7+
const val AVRO: String = "1.8.2"
8+
9+
const val GROOVY: String = "2.4.16"//"2.4.21"//"2.4.13" CVE
10+
// const val APACHE_COMMONS = "1.6"
11+
const val SPOCK: String = "1.1-groovy-2.4" //"1.3-groovy-2.5"
12+
const val SLF4J = "1.7.30"
13+
14+
const val COMMONS_TEXT = "1.6"
15+
}

schemas-analyze/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ repositories {
1818

1919
dependencies {
2020
implementation(project(":schemas-core"))
21-
implementation("org.apache.commons:commons-text:1.6")
21+
implementation("org.apache.commons:commons-text:${Versions.COMMONS_TEXT}")
2222
implementation("org.locationtech.jts.io:jts-io-common:1.16.1")
2323

24-
testImplementation("org.slf4j:slf4j-simple:1.7.30")
24+
testImplementation("org.slf4j:slf4j-simple:${Versions.SLF4J}")
2525
testImplementation(project(":schemas-parse"))
26-
testImplementation("org.spockframework:spock-core:1.1-groovy-2.4")
26+
testImplementation("org.spockframework:spock-core:${Versions.SPOCK}")
2727
}
2828

2929
tasks {

schemas-core/build.gradle.kts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ repositories {
2222
dependencies {
2323
api("org.apache.avro:avro:1.8.2")
2424

25-
testImplementation("org.slf4j:slf4j-simple:1.7.30")
26-
testImplementation("org.codehaus.groovy:groovy:2.4.13")
27-
testImplementation("org.spockframework:spock-core:1.1-groovy-2.4")
28-
testImplementation("org.apache.kafka:kafka-streams-test-utils:2.3.0")
29-
testImplementation("org.apache.kafka:kafka-clients:2.3.0")
30-
testImplementation("org.apache.kafka:kafka-clients:2.3.0:test")
31-
testImplementation("org.apache.kafka:kafka_2.12:2.3.0")
32-
testImplementation("org.apache.kafka:kafka_2.12:2.3.0:test")
33-
testImplementation("io.confluent:kafka-schema-registry:5.3.0")
34-
testImplementation("io.confluent:kafka-schema-registry:5.3.0:tests")
35-
testImplementation("io.confluent:kafka-streams-avro-serde:5.3.0")
25+
testImplementation("org.slf4j:slf4j-simple:${Versions.SLF4J}")
26+
testImplementation("org.codehaus.groovy:groovy:${Versions.GROOVY}")
27+
testImplementation("org.spockframework:spock-core:${Versions.SPOCK}")
28+
testImplementation("org.apache.kafka:kafka-streams-test-utils:${Versions.KAFKA}")
29+
testImplementation("org.apache.kafka:kafka-clients:${Versions.KAFKA}")
30+
testImplementation("org.apache.kafka:kafka-clients:${Versions.KAFKA}:test")
31+
testImplementation("org.apache.kafka:kafka_2.12:${Versions.KAFKA}")
32+
testImplementation("org.apache.kafka:kafka_2.12:${Versions.KAFKA}:test")
33+
testImplementation("io.confluent:kafka-schema-registry:${Versions.CONFLUENT}")
34+
testImplementation("io.confluent:kafka-schema-registry:${Versions.CONFLUENT}:tests")
35+
testImplementation("io.confluent:kafka-streams-avro-serde:${Versions.CONFLUENT}")
3636
testImplementation("com.github.everit-org.json-schema:org.everit.json.schema:1.9.2")
3737
testImplementation("org.json:json:20180813")
3838
}

schemas-parse/build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ repositories {
1818

1919
dependencies {
2020
implementation(project(":schemas-core"))
21-
implementation("org.apache.commons:commons-text:1.6")
22-
implementation("org.codehaus.groovy:groovy-xml:2.4.16")
23-
implementation("org.codehaus.groovy:groovy-json:2.4.16")
21+
implementation("org.apache.commons:commons-text:${Versions.COMMONS_TEXT}")
22+
implementation("org.codehaus.groovy:groovy-xml:${Versions.GROOVY}")
23+
implementation("org.codehaus.groovy:groovy-json:${Versions.GROOVY}")
2424

25-
testImplementation("org.slf4j:slf4j-simple:1.7.30")
26-
testImplementation("org.spockframework:spock-core:1.1-groovy-2.4")
25+
testImplementation("org.slf4j:slf4j-simple:${Versions.SLF4J}")
26+
testImplementation("org.spockframework:spock-core:${Versions.SPOCK}")
2727
}
2828

2929
tasks {

0 commit comments

Comments
 (0)