mirror of https://github.com/sbt/sbt.git
Using outputChanged to track the change of the jar file instead of unit
This commit is contained in:
parent
f6fa7cb765
commit
e83013d3c8
|
|
@ -23,7 +23,7 @@ import sbt.internal.util.HNil
|
|||
import sbt.internal.util.HListFormats._
|
||||
import sbt.util.FileInfo.{ exists, lastModified }
|
||||
import sbt.util.CacheImplicits._
|
||||
import sbt.util.Tracked.inputChanged
|
||||
import sbt.util.Tracked.{ inputChanged, outputChanged }
|
||||
|
||||
sealed trait PackageOption
|
||||
object Package {
|
||||
|
|
@ -71,10 +71,11 @@ object Package {
|
|||
inputs: Map[File, String] :+: FilesInfo[ModifiedFileInfo] :+: Manifest :+: HNil) =>
|
||||
import exists.format
|
||||
val sources :+: _ :+: manifest :+: HNil = inputs
|
||||
inputChanged(cacheStoreFactory make "output") { (outChanged, jar: PlainFileInfo) =>
|
||||
if (inChanged || outChanged)
|
||||
outputChanged(cacheStoreFactory make "output") { (outChanged, jar: PlainFileInfo) =>
|
||||
if (inChanged || outChanged) {
|
||||
makeJar(sources.toSeq, jar.file, manifest, log)
|
||||
else
|
||||
jar.file
|
||||
} else
|
||||
log.debug("Jar uptodate: " + jar.file)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue