Skip to content

Commit 3f15838

Browse files
committed
use one Flink version as a variable across the projects
1 parent 0f44cc2 commit 3f15838

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

build.gradle.kts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ plugins {
88
id("com.gradleup.shadow") version "8.3.6" apply false
99
}
1010

11+
// Define versions at the root level
12+
val flinkVersion = "1.20.0"
13+
val confluentVersion = "7.9.0"
14+
1115
allprojects {
1216
group = "io.confluent.developer"
1317
version = "1.0-SNAPSHOT"
@@ -18,13 +22,15 @@ allprojects {
1822
url = uri("https://packages.confluent.io/maven/")
1923
}
2024
}
25+
26+
// Share versions with all projects
27+
extra["flinkVersion"] = flinkVersion
28+
extra["confluentVersion"] = confluentVersion
2129
}
2230

2331
subprojects {
2432
apply(plugin = "java")
2533

26-
val flinkVersion = "1.20.0"
27-
val confluentVersion = "7.9.0"
2834
val junitVersion = "5.10.2"
2935
val logbackVersion = "1.4.14"
3036
val slf4jVersion = "2.0.11"
@@ -68,9 +74,6 @@ configure(subprojects.filter { it.name == "flink-streaming" || it.name == "flink
6874
apply(plugin = "application")
6975
apply(plugin = "com.gradleup.shadow")
7076

71-
val flinkVersion = "1.20.0"
72-
val confluentVersion = "7.9.0"
73-
7477
dependencies {
7578
// Common modules
7679
implementation(project(":common:models"))
@@ -95,8 +98,6 @@ configure(subprojects.filter { it.name == "flink-streaming" || it.name == "flink
9598
// Configuration specific to the flink-sql module
9699
project(":flink-sql") {
97100
dependencies {
98-
val flinkVersion = "1.20.0"
99-
100101
// Flink Table API & SQL
101102
implementation("org.apache.flink:flink-table-api-java-bridge:$flinkVersion")
102103
implementation("org.apache.flink:flink-table-planner-loader:$flinkVersion")

flink-data-generator/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ plugins {
55
id("com.gradleup.shadow")
66
}
77

8-
val flinkVersion = "1.20.0"
9-
val confluentVersion = "7.9.0"
8+
val flinkVersion = rootProject.extra["flinkVersion"] as String
9+
val confluentVersion = rootProject.extra["confluentVersion"] as String
1010
val datafakerVersion = "2.1.0"
1111

1212
dependencies {

flink-sql/build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
val flinkVersion = rootProject.extra["flinkVersion"] as String
2+
13
dependencies {
24
// Add SQL-specific dependencies here
3-
testImplementation("org.apache.flink:flink-test-utils:1.20.0")
5+
testImplementation("org.apache.flink:flink-test-utils:$flinkVersion")
46
}

flink-streaming/build.gradle.kts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
val flinkVersion = rootProject.extra["flinkVersion"] as String
2+
13
dependencies {
24
// Add streaming-specific dependencies here
3-
testImplementation("org.apache.flink:flink-test-utils:1.20.0")
4-
testImplementation("org.apache.flink:flink-runtime:1.20.0:tests")
5-
testImplementation("org.apache.flink:flink-streaming-java:1.20.0:tests")
5+
testImplementation("org.apache.flink:flink-test-utils:$flinkVersion")
6+
testImplementation("org.apache.flink:flink-runtime:$flinkVersion:tests")
7+
testImplementation("org.apache.flink:flink-streaming-java:$flinkVersion:tests")
68
}

0 commit comments

Comments
 (0)