Skip to content
This repository has been archived by the owner on Feb 23, 2018. It is now read-only.

Commit

Permalink
Use sbt-assembly to build a jar containing jansi
Browse files Browse the repository at this point in the history
The maven build includes jansi into the built jar using the
maven-shade-plugin.

Fixes part of #1. However, `sbt publish` publishes the ordinary
jar, not the assembly jar built by `sbt assembly`. Still to do.
  • Loading branch information
lrytz committed Jul 17, 2015
1 parent f08da24 commit 7d593e5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.sbt
Expand Up @@ -26,3 +26,19 @@ javacOptions in doc := Seq("-source", "1.5")
scalaModuleOsgiSettings

OsgiKeys.exportPackage := Seq(s"scala.tools.jline.*;version=${version.value}")

// exclude some files, same patterns as in `pom.xml`
assemblyMergeStrategy in assembly := {
case PathList("META-INF", "maven", _ @ _*) =>
MergeStrategy.discard

case PathList(ps @ _*) if ps.last endsWith ".txt" =>
MergeStrategy.discard

case PathList("org", "fusesource", "hawtjni", "runtime", p) if p.startsWith("Jni") || p.contains("Flag") || p.startsWith("T32") || p.startsWith("NativeStats") =>
MergeStrategy.discard

case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
2 changes: 2 additions & 0 deletions project/plugins.sbt
@@ -1,3 +1,5 @@
addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.3")

addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.4")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")

0 comments on commit 7d593e5

Please sign in to comment.