Skip to content

Instantly share code, notes, and snippets.

@TomLous
Last active January 1, 2020 19:30
Show Gist options
  • Save TomLous/6211116121554bb7e0d0b492cd623514 to your computer and use it in GitHub Desktop.
Save TomLous/6211116121554bb7e0d0b492cd623514 to your computer and use it in GitHub Desktop.
build.sbt part 5 for Medium Post
lazy val root = (project in file("."))
.enablePlugins(sbtdocker.DockerPlugin)
.enablePlugins(AshScriptPlugin)
.settings(
commonSettings,
assemblySettings,
dockerSettings,
runLocalSettings,
name := "transform-movie-ratings",
Compile / mainClass := Some("xyz.graphiq.BasicSparkJob"),
Compile / resourceGenerators += createImporterHelmChart.taskValue
)
// Include "provided" dependencies back to default run task
lazy val runLocalSettings = Seq(
// https://stackoverflow.com/questions/18838944/how-to-add-provided-dependencies-back-to-run-test-tasks-classpath/21803413#21803413
Compile / run := Defaults
.runTask(
fullClasspath in Compile,
mainClass in (Compile, run),
runner in (Compile, run)
)
.evaluated
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment