Skip to content

Commit e462ab5

Browse files
committed
DRY the kafka version
1 parent 42f4be8 commit e462ab5

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.ci/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ env
55

66
set -ex
77

8-
export KAFKA_VERSION=3.9.1
8+
# Extract apacheKafkaVersion from gradle.properties
9+
export KAFKA_VERSION=$(grep "^apacheKafkaVersion" ../gradle.properties | cut -d'=' -f2)
910
./kafka_test_setup.sh
1011

1112
bundle exec rspec -fd

build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ java {
3737
sourceCompatibility = JavaVersion.VERSION_1_8
3838
}
3939

40-
// given https://docs.confluent.io/current/installation/versions-interoperability.html matrix
41-
// Confluent Platform 7.9.x is Apache Kafka 3.9.x
42-
String confluentKafkaVersion = '7.9.1'
43-
String apacheKafkaVersion = '3.9.1'
40+
// Versions are defined in gradle.properties
41+
String confluentKafkaVersion = project.property('confluentKafkaVersion')
42+
String apacheKafkaVersion = project.property('apacheKafkaVersion')
4443

4544
repositories {
4645
mavenCentral()

gradle.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
org.gradle.daemon=false
2+
3+
# given https://docs.confluent.io/current/installation/versions-interoperability.html matrix
4+
# Confluent Platform 7.9.x is Apache Kafka 3.9.x
5+
# Kafka version used by both build.gradle and CI scripts
6+
apacheKafkaVersion=3.9.1
7+
confluentKafkaVersion=7.9.1

0 commit comments

Comments
 (0)