Skip to content

Commit

Permalink
fix sbt-assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
barend-xebia committed Jul 26, 2024
1 parent 91fbe1e commit fe4bb1b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ jobs:
shell: bash
run: |
sbt +test
- name: Verify assembly
shell: bash
run: |
sbt +package +assembly
7 changes: 7 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ lazy val `spot-complete` = project
assembly / assemblyJarName := s"${name.value}_${scalaBinaryVersion.value}-${version.value}.jar",
assembly / assemblyOption ~= {
_.withIncludeScala(false)
},
assembly / assemblyMergeStrategy := {
// TODO this okio business may well be wrong. Revisit this once we have an integration test to run.
case "META-INF/okio.kotlin_module" => MergeStrategy.first
case x =>
val oldStrategy = (ThisBuild / assemblyMergeStrategy).value
oldStrategy(x)
}
)

Expand Down
7 changes: 6 additions & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ object Dependencies {
val `opentelemetry-api` = "io.opentelemetry" % "opentelemetry-api" % openTelemetryVersion
val `opentelemetry-sdk` = "io.opentelemetry" % "opentelemetry-sdk" % openTelemetryVersion
val `opentelemetry-sdk-autoconfigure` = "io.opentelemetry" % "opentelemetry-sdk-extension-autoconfigure" % openTelemetryVersion
val `opentelemetry-exporter-otlp` = "io.opentelemetry" % "opentelemetry-exporter-otlp" % openTelemetryVersion
val `opentelemetry-exporter-otlp` = "io.opentelemetry" % "opentelemetry-exporter-otlp" % openTelemetryVersion excludeAll(
// Okio includes three JVM-versions of kotlin-stdlib. This causes problems for sbt-assembly-plugin. Here we assume
// that by now everyone is running Spark on JDK 11, and we omit JDK 8.
ExclusionRule("org.jetbrains.kotlin", "kotlin-stdlib-jdk7"),
ExclusionRule("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
)
val `spark-core` = "org.apache.spark" %% "spark-core" % "3.5.1"
val scalactic = "org.scalactic" %% "scalactic" % "3.2.19"
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.19"
Expand Down

0 comments on commit fe4bb1b

Please sign in to comment.