diff --git a/main-command/src/main/scala/sbt/Stamped.scala b/main-command/src/main/scala/sbt/Stamped.scala index 8e3f5fa26..32fad1465 100644 --- a/main-command/src/main/scala/sbt/Stamped.scala +++ b/main-command/src/main/scala/sbt/Stamped.scala @@ -29,25 +29,26 @@ private[sbt] trait Stamped { * Provides converter functions from TypedPath to [[Stamped]]. */ private[sbt] object Stamped { - type File = JFile with Stamped with TypedPath - def file(typedPath: TypedPath, entry: FileCacheEntry): JFile with Stamped with TypedPath = + type File = JFile with Stamped + def file(typedPath: TypedPath, entry: FileCacheEntry): JFile with Stamped = new StampedFileImpl(typedPath, entry.stamp) /** * Converts a TypedPath instance to a [[Stamped]] by calculating the file hash. */ - val sourceConverter: TypedPath => Stamp = tp => Stamper.forHash(tp.toPath.toFile) + private[sbt] val sourceConverter: TypedPath => Stamp = tp => Stamper.forHash(tp.toPath.toFile) /** * Converts a TypedPath instance to a [[Stamped]] using the last modified time. */ - val binaryConverter: TypedPath => Stamp = tp => Stamper.forLastModified(tp.toPath.toFile) + private[sbt] val binaryConverter: TypedPath => Stamp = tp => + Stamper.forLastModified(tp.toPath.toFile) /** * A combined convert that converts TypedPath instances representing *.jar and *.class files * using the last modified time and all other files using the file hash. */ - val converter: TypedPath => Stamp = (_: TypedPath) match { + private[sbt] val converter: TypedPath => Stamp = (_: TypedPath) match { case typedPath if !typedPath.exists => EmptyStamp case typedPath if typedPath.isDirectory => binaryConverter(typedPath) case typedPath => @@ -61,7 +62,7 @@ private[sbt] object Stamped { /** * Adds a default ordering that just delegates to the java.io.File.compareTo method. */ - implicit case object ordering extends Ordering[Stamped.File] { + private[sbt] implicit case object ordering extends Ordering[Stamped.File] { override def compare(left: Stamped.File, right: Stamped.File): Int = left.compareTo(right) } diff --git a/main/src/main/scala/sbt/internal/FileTree.scala b/main/src/main/scala/sbt/internal/FileTree.scala index ba2e63f4d..292515ae2 100644 --- a/main/src/main/scala/sbt/internal/FileTree.scala +++ b/main/src/main/scala/sbt/internal/FileTree.scala @@ -16,9 +16,9 @@ import sbt.io._ import scala.language.experimental.macros -object FileTree { - trait Repository extends sbt.internal.Repository[Seq, Glob, Entry[FileCacheEntry]] - object Repository { +private[sbt] object FileTree { + private[sbt] trait Repository extends sbt.internal.Repository[Seq, Glob, Entry[FileCacheEntry]] + private[sbt] object Repository { /** * Provide a default [[Repository]] that works within a task definition, e.g. Def.task. It's