Skip to content

Commit 6bc39ce

Browse files
committed
Fix Scala 2.13 builds in SBT.
Signed-off-by: Pascal Spörri <psp@zurich.ibm.com>
1 parent 430e655 commit 6bc39ce

File tree

5 files changed

+11
-27
lines changed

5 files changed

+11
-27
lines changed

.github/prepare-build.sh

-16
This file was deleted.

.github/workflows/ci.yml

-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ jobs:
6262
distribution: temurin
6363
java-version: 11
6464
cache: sbt
65-
- name: Prepare build
66-
shell: bash
67-
run: ./.github/prepare-build.sh
6865
- name: Package
6966
shell: bash
7067
run: |

build.sbt

+11-8
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,24 @@ buildInfoKeys ++= Seq[BuildInfoKey](
2424
BuildInfoKey.action("sparkVersion") {
2525
sparkVersion
2626
}
27-
)
27+
)
2828

2929
libraryDependencies ++= Seq(
3030
"org.apache.spark" %% "spark-core" % sparkVersion % "provided",
3131
"org.apache.spark" %% "spark-sql" % sparkVersion % "provided",
3232
"org.apache.spark" %% "spark-hadoop-cloud" % sparkVersion % "compile",
33+
)
3334

34-
// Note: The tests don't work with Scala 2.13
35-
"junit" % "junit" % "4.13.2" % Test, // TRAVIS_SCALA_WORKAROUND_REMOVE_LINE
36-
"org.scalatest" %% "scalatest" % "3.2.2" % Test, // TRAVIS_SCALA_WORKAROUND_REMOVE_LINE
37-
"ch.cern.sparkmeasure" %% "spark-measure" % "0.18" % Test, // TRAVIS_SCALA_WORKAROUND_REMOVE_LINE
38-
"org.scalacheck" %% "scalacheck" % "1.15.2" % Test, // TRAVIS_SCALA_WORKAROUND_REMOVE_LINE
39-
"org.mockito" % "mockito-core" % "3.4.6" % Test, // TRAVIS_SCALA_WORKAROUND_REMOVE_LINE
40-
"org.scalatestplus" %% "mockito-3-4" % "3.2.9.0" % Test // TRAVIS_SCALA_WORKAROUND_REMOVE_LINE
35+
libraryDependencies ++= (if (scalaBinaryVersion.value == "2.12") Seq(
36+
"junit" % "junit" % "4.13.2" % Test,
37+
"org.scalatest" %% "scalatest" % "3.2.2" % Test,
38+
"ch.cern.sparkmeasure" %% "spark-measure" % "0.18" % Test,
39+
"org.scalacheck" %% "scalacheck" % "1.15.2" % Test,
40+
"org.mockito" % "mockito-core" % "3.4.6" % Test,
41+
"org.scalatestplus" %% "mockito-3-4" % "3.2.9.0" % Test
4142
)
43+
else Seq())
44+
4245
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
4346
javaOptions ++= Seq("-Xms512M", "-Xmx2048M", "-XX:MaxPermSize=2048M", "-XX:+CMSClassUnloadingEnabled")
4447
scalacOptions ++= Seq("-deprecation", "-unchecked")

0 commit comments

Comments
 (0)