Skip to content

Commit 76e3ea2

Browse files
committed
updating gradle, fix scala plugin for 2.12 versions, jackson fix now only for spark 3.3.1
1 parent 2d84869 commit 76e3ea2

File tree

5 files changed

+24
-9
lines changed

5 files changed

+24
-9
lines changed

core/build.gradle.kts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ dependencies {
2626
reflect,
2727
)
2828

29+
// https://github.com/FasterXML/jackson-bom/issues/52
30+
if (Versions.spark == "3.3.1") implementation(jacksonDatabind)
31+
2932
implementation(
30-
jacksonDatabind, // Spark 3.3.1 https://github.com/FasterXML/jackson-bom/issues/52
3133
sparkSql,
3234
)
3335
}
@@ -36,14 +38,18 @@ dependencies {
3638

3739
java {
3840
toolchain {
39-
languageVersion.set(
40-
JavaLanguageVersion.of(Versions.jvmTarget)
41-
)
41+
if (Versions.scalaCompat.toDouble() > 2.12) { // scala 2.12 will always target java 8
42+
languageVersion.set(
43+
JavaLanguageVersion.of(Versions.jvmTarget)
44+
)
45+
}
4246
}
4347
}
4448

4549
tasks.withType<ScalaCompile> {
46-
targetCompatibility = Versions.jvmTarget
50+
if (Versions.scalaCompat.toDouble() > 2.12) { // scala 2.12 will always target java 8
51+
targetCompatibility = Versions.jvmTarget
52+
}
4753
}
4854

4955
val scalaMainSources = sourceSets.main.get().scala.sourceDirectories

examples/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ dependencies {
2121
}
2222

2323
with(Dependencies) {
24+
25+
// https://github.com/FasterXML/jackson-bom/issues/52
26+
if (Versions.spark == "3.3.1") implementation(jacksonDatabind)
27+
2428
implementation(
2529
sparkSql,
26-
jacksonDatabind, // Spark 3.3.1 https://github.com/FasterXML/jackson-bom/issues/52
2730
sparkMl,
2831
sparkStreaming,
2932
sparkStreamingKafka,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

jupyter/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ dependencies {
4343
}
4444

4545
with(Dependencies) {
46+
47+
// https://github.com/FasterXML/jackson-bom/issues/52
48+
if (Versions.spark == "3.3.1") implementation(jacksonDatabind)
49+
4650
api(
4751
kotlinxHtml,
4852
sparkSql,
@@ -52,7 +56,6 @@ dependencies {
5256
)
5357

5458
implementation(
55-
jacksonDatabind, // Spark 3.3.1 https://github.com/FasterXML/jackson-bom/issues/52
5659
kotlinStdLib,
5760
)
5861

kotlin-spark-api/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ dependencies {
3535
}
3636

3737
with(Dependencies) {
38+
39+
// https://github.com/FasterXML/jackson-bom/issues/52
40+
if (Versions.spark == "3.3.1") implementation(jacksonDatabind)
41+
3842
implementation(
3943
kotlinStdLib,
4044
reflect,
41-
jacksonDatabind, // Spark 3.3.1 https://github.com/FasterXML/jackson-bom/issues/52
4245
sparkSql,
4346
sparkStreaming,
4447
hadoopClient,

0 commit comments

Comments
 (0)