Skip to content

Commit

Permalink
#57 move assembly plugin related stuff into it's own sbt file
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyweston committed Apr 15, 2018
1 parent 514a1cc commit 6de773b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
16 changes: 16 additions & 0 deletions assembly.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

assemblyJarName in assembly := s"${name.value}-${version.value}.jar"

// fixes https://github.com/tobyweston/temperature-machine/issues/39
assemblyMergeStrategy in assembly := {
case PathList(xs @ _*) if xs.last == "module-info.class" => MergeStrategy.first
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}

// Remove ScalaDoc generation
sources in(Compile, doc) := Seq.empty
publishArtifact in(Compile, packageDoc) := false

addArtifact(artifact in(Compile, assembly), assembly)
9 changes: 0 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ version := "2.1"

organization := "bad.robot"

assemblyJarName in assembly := s"${name.value}-${version.value}.jar"

scalaVersion := "2.12.4"

mainClass in Compile := Some("bad.robot.temperature.Main")
Expand All @@ -32,10 +30,3 @@ libraryDependencies ++= Seq(

scalacOptions := Seq("-Xlint", "-Xfatal-warnings", "-deprecation", "-feature", "-language:implicitConversions,reflectiveCalls,higherKinds", "-Ypartial-unification")

// fixes https://github.com/tobyweston/temperature-machine/issues/39
assemblyMergeStrategy in assembly := {
case PathList(xs @ _*) if xs.last == "module-info.class" => MergeStrategy.first
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}

0 comments on commit 6de773b

Please sign in to comment.