Skip to content

Commit

Permalink
remove spark version
Browse files Browse the repository at this point in the history
  • Loading branch information
FANNG1 committed Jan 22, 2024
1 parent 4d54796 commit 272538f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions integration-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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") {
Expand Down

0 comments on commit 272538f

Please sign in to comment.