Skip to content

Commit

Permalink
build: unmanagedResourceにLICENCEを追加しない
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Mar 12, 2023
1 parent 89ef535 commit f580b0a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ assembly / assemblyExcludedJars := {

// protocol配下とルートのLICENSEが衝突してCIが落ちる
// cf. https://github.com/sbt/sbt-assembly/issues/141
assemblyMergeStrategy in assembly := {
case PathList(ps @ _*) if ps.last endsWith "LICENSE" => MergeStrategy.rename
assembly / assemblyMergeStrategy := {
case PathList(ps @ _*) if ps.last endsWith "LICENSE" => MergeStrategy.first
case otherFile =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(otherFile)
}

Expand All @@ -159,8 +159,6 @@ Compile / filteredResourceGenerator :=

Compile / resourceGenerators += (Compile / filteredResourceGenerator)

Compile / unmanagedResources += baseDirectory.value / "LICENSE"

// トークン置換を行ったファイルをunmanagedResourcesのコピーから除外する
unmanagedResources / excludeFilter :=
filesToBeReplacedInResourceFolder.foldLeft((unmanagedResources / excludeFilter).value)(
Expand Down

0 comments on commit f580b0a

Please sign in to comment.