Skip to content

Commit 7b6cc89

Browse files
author
Moritz Mack
committed
Keep Spark version in a single place only (BeamModulePlugin)
1 parent 1c1ecb2 commit 7b6cc89

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,10 @@ class BeamModulePlugin implements Plugin<Project> {
499499
def arrow_version = "5.0.0"
500500
def jmh_version = "1.34"
501501

502+
// Export Spark versions, so they are defined in a single place only
503+
project.ext.spark2_version = spark2_version
504+
project.ext.spark3_version = spark3_version
505+
502506
// A map of maps containing common libraries used per language. To use:
503507
// dependencies {
504508
// compile library.java.slf4j_api

runners/spark/2/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
def basePath = '..'
2020
/* All properties required for loading the Spark build script */
2121
project.ext {
22-
// Set the version of all Spark-related dependencies here.
23-
spark_version = '2.4.8'
22+
// Spark 2 version as defined in BeamModulePlugin
23+
spark_version = spark2_version
2424
spark_scala_version = '2.11'
2525
// Copy shared sources for Spark 2 to use Spark 3 as primary version in place
2626
copySourceBase = true

runners/spark/3/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
def basePath = '..'
2020
/* All properties required for loading the Spark build script */
2121
project.ext {
22-
// Set the version of all Spark-related dependencies here.
23-
spark_version = '3.1.2'
22+
// Spark 3 version as defined in BeamModulePlugin
23+
spark_version = spark3_version
2424
spark_scala_version = '2.12'
2525
copySourceBase = false // disabled to use Spark 3 as primary dev version
2626
archives_base_name = 'beam-runners-spark-3'
@@ -29,7 +29,7 @@ project.ext {
2929
// Load the main build script which contains all build logic.
3030
apply from: "$basePath/spark_runner.gradle"
3131

32-
32+
// Additional supported Spark versions (used in compatibility tests)
3333
def sparkVersions = [
3434
"330": "3.3.0",
3535
"321": "3.2.1"

0 commit comments

Comments
 (0)