Skip to content

Commit

Permalink
Fix duplicate content of native resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Aug 3, 2019
1 parent c8b1437 commit d6c3193
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ lazy val core = myCrossProject("core")
Dependencies.scalaTest % Test
),
assembly / test := {},
assemblyMergeStrategy in assembly := {
val nativeSuffix = "\\.(?:dll|jnilib|so)$".r

{
case PathList(ps @ _*) if nativeSuffix.findFirstMatchIn(ps.last).isDefined =>
MergeStrategy.first
case otherwise =>
val defaultStrategy = (assemblyMergeStrategy in assembly).value
defaultStrategy(otherwise)
}
},
buildInfoKeys := Seq[BuildInfoKey](scalaVersion, sbtVersion),
buildInfoPackage := moduleRootPkg.value,
initialCommands += s"""
Expand Down

0 comments on commit d6c3193

Please sign in to comment.