Merge pull request #5018 from eatkins/output-file-stamp-cache

Use managedFileStampCache for dependency classpath
This commit is contained in:
eugene yokota 2019-09-02 23:17:27 -04:00 committed by GitHub
commit 4f2ffe9b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -2041,7 +2041,12 @@ object Classpaths {
excludeFilter in unmanagedJars value excludeFilter in unmanagedJars value
) )
).map(exportClasspath) ++ Seq( ).map(exportClasspath) ++ Seq(
sbt.nio.Keys.dependencyClasspathFiles := data(dependencyClasspath.value).map(_.toPath), dependencyClasspathFiles := data(dependencyClasspath.value).map(_.toPath),
dependencyClasspathFiles / outputFileStamps := {
val cache = managedFileStampCache.value
val stamper = outputFileStamper.value
dependencyClasspathFiles.value.flatMap(p => cache.getOrElseUpdate(p, stamper).map(p -> _))
}
) )
private[this] def exportClasspath(s: Setting[Task[Classpath]]): Setting[Task[Classpath]] = private[this] def exportClasspath(s: Setting[Task[Classpath]]): Setting[Task[Classpath]] =