Skip to content

Commit

Permalink
Merge pull request #485 from ingarabr/tag-task
Browse files Browse the repository at this point in the history
feat: tag assemly task
  • Loading branch information
eed3si9n authored Nov 10, 2022
2 parents 1a529bc + a04849b commit b074c40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/scala/sbtassembly/Assembly.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import sbt.util.FileInfo.lastModified
import sbt.util.Tracked.{ inputChanged, lastOutput }
import sbt.util.{ FilesInfo, Level, ModifiedFileInfo }
import sbt.{ File, Logger, _ }
import sbt.Tags.Tag
import CacheImplicits._
import sbtassembly.AssemblyPlugin.autoImport.{ Assembly => _, _ }
import sbtassembly.PluginCompat.ClasspathUtilities
Expand Down Expand Up @@ -40,6 +41,8 @@ object Assembly {
val indent: String = " " * 2
val newLineIndented: String = newLine + indent

val assemblyTag = Tag("assembly")

private[sbtassembly] type CacheKey = FilesInfo[ModifiedFileInfo] :+:
Map[String, (Boolean, String)] :+: // map of target paths that matched a merge strategy
JManifest :+:
Expand Down Expand Up @@ -192,7 +195,7 @@ object Assembly {
s.cacheDirectory,
s.log
)
}
}.tag(assemblyTag)

/**
* Builds an assembly jar
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/sbtassembly/AssemblyPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ object AssemblyPlugin extends sbt.AutoPlugin {
assemblyAppendContentHash := false,
assemblyPrependShellScript := None,
assemblyCacheOutput := true,
assemblyRepeatableBuild := true
assemblyRepeatableBuild := true,
concurrentRestrictions += Tags.limit(Assembly.assemblyTag, 1)
)

override lazy val projectSettings: Seq[Def.Setting[_]] = assemblySettings
Expand Down

0 comments on commit b074c40

Please # to comment.