diff --git a/build.gradle.kts b/build.gradle.kts index b585bddc6df..c6b4de7893d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,6 +52,11 @@ if (extra["jdkVersion"] !in listOf("8", "11", "17")) { ) } +val scalaVersion: String = project.properties["scalaVersion"] as? String ?: extra["defaultScalaVersion"].toString() +if (scalaVersion !in listOf("2.12")) { + throw GradleException("Found unsupported Scala version: $scalaVersion") +} + project.extra["extraJvmArgs"] = if (extra["jdkVersion"] in listOf("8", "11")) { listOf() } else { diff --git a/gradle.properties b/gradle.properties index 0492cdfef27..6bf51d2cddb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,6 +21,3 @@ jdkVersion = 8 # defaultScalaVersion is used to specify the version of Scala to build and test Gravitino defaultScalaVersion = 2.12 - -# defaultSparkVersion is used to specify the version of Spark to build and test Gravitino -defaultSparkVersion = 3.4 diff --git a/integration-test/build.gradle.kts b/integration-test/build.gradle.kts index 1e9e217ac62..86fed3061c0 100644 --- a/integration-test/build.gradle.kts +++ b/integration-test/build.gradle.kts @@ -13,7 +13,6 @@ plugins { } val scalaVersion: String = project.properties["scalaVersion"] as? String ?: extra["defaultScalaVersion"].toString() -val sparkMajorVersion: String = project.properties["sparkVersion"] as? String ?: extra["defaultSparkVersion"].toString() val sparkVersion: String = libs.versions.spark.get() val icebergVersion: String = libs.versions.iceberg.get() val scalaCollectionCompatVersion: String = libs.versions.scala.collection.compat.get() @@ -102,7 +101,7 @@ dependencies { testRuntimeOnly(libs.junit.jupiter.engine) testImplementation(libs.mockito.core) testImplementation(libs.bundles.log4j) - testImplementation("org.apache.iceberg:iceberg-spark-runtime-${sparkMajorVersion}_$scalaVersion:$icebergVersion") + testImplementation("org.apache.iceberg:iceberg-spark-runtime-3.4_$scalaVersion:$icebergVersion") testImplementation("org.apache.spark:spark-hive_$scalaVersion:$sparkVersion") testImplementation("org.scala-lang.modules:scala-collection-compat_$scalaVersion:$scalaCollectionCompatVersion") testImplementation("org.apache.spark:spark-sql_$scalaVersion:$sparkVersion") {