mirror of https://github.com/sbt/sbt.git
Adjust to changes
This commit is contained in:
parent
ab43ec51d8
commit
89a17c79d6
|
|
@ -1,33 +0,0 @@
|
|||
package sbt
|
||||
|
||||
/**
|
||||
* An enumeration defining the tracking of dependencies. A level includes all of the levels
|
||||
* with id larger than its own id. For example, Warn (id=3) includes Error (id=4).
|
||||
*/
|
||||
object TrackLevel {
|
||||
case object NoTracking extends TrackLevel {
|
||||
override def id: Int = 0
|
||||
}
|
||||
case object TrackIfMissing extends TrackLevel {
|
||||
override def id: Int = 1
|
||||
}
|
||||
case object TrackAlways extends TrackLevel {
|
||||
override def id: Int = 10
|
||||
}
|
||||
|
||||
private[sbt] def apply(x: Int): TrackLevel =
|
||||
x match {
|
||||
case 0 => NoTracking
|
||||
case 1 => TrackIfMissing
|
||||
case 10 => TrackAlways
|
||||
}
|
||||
|
||||
def intersection(a: TrackLevel, b: TrackLevel): TrackLevel =
|
||||
if (a.id < b.id) a
|
||||
else b
|
||||
def intersectionAll(vs: List[TrackLevel]): TrackLevel = vs reduceLeft intersection
|
||||
}
|
||||
|
||||
sealed trait TrackLevel {
|
||||
def id: Int
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ import sbt.util.InterfaceUtil.{ f1, o2m }
|
|||
import sbt.internal.util.Types._
|
||||
|
||||
import sbt.internal.io.WatchState
|
||||
import sbt.io.{ AllPassFilter, FileFilter, GlobFilter, HiddenFileFilter, IO, NameFilter, NothingFilter, Path, PathFinder, SimpleFileFilter }
|
||||
import sbt.io.{ AllPassFilter, FileFilter, GlobFilter, HiddenFileFilter, IO, NameFilter, NothingFilter, Path, PathFinder, SimpleFileFilter, DirectoryFilter }
|
||||
|
||||
import Path._
|
||||
import Keys._
|
||||
|
|
@ -1632,7 +1632,7 @@ object Classpaths {
|
|||
val config = configuration.value
|
||||
for { (f, analysis) <- trackedProductsImplTask(track).value } yield APIMappings.store(analyzed(f, analysis), apiURL.value).put(artifact.key, art).put(moduleID.key, module).put(configuration.key, config)
|
||||
}
|
||||
private[this] def trackedProductsImplTask(track: TrackLevel): Initialize[Task[Seq[(File, Analysis)]]] =
|
||||
private[this] def trackedProductsImplTask(track: TrackLevel): Initialize[Task[Seq[(File, CompileAnalysis)]]] =
|
||||
Def.taskDyn {
|
||||
val useJars = exportJars.value
|
||||
val jar = (artifactPath in packageBin).value
|
||||
|
|
@ -1662,10 +1662,11 @@ object Classpaths {
|
|||
}
|
||||
case _ =>
|
||||
Def.task {
|
||||
val analysis = previousCompile.value.analysis
|
||||
val analysisOpt = previousCompile.value.analysis
|
||||
(if (useJars) Seq(jar)
|
||||
else dirs) map {
|
||||
(_, analysis)
|
||||
else dirs) map { x =>
|
||||
(x, if (analysisOpt.isDefined) analysisOpt.get
|
||||
else Analysis.empty(true))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ import sbt.librarymanagement.{
|
|||
Resolver,
|
||||
ScalaVersion,
|
||||
ScmInfo,
|
||||
TrackLevel,
|
||||
UpdateOptions,
|
||||
UpdateReport
|
||||
}
|
||||
|
|
|
|||
|
|
@ -322,6 +322,8 @@ object Import {
|
|||
type SshBasedRepository = sbt.librarymanagement.SshBasedRepository
|
||||
val SshRepository = sbt.librarymanagement.SshRepository
|
||||
type SshRepository = sbt.librarymanagement.SshRepository
|
||||
type TrackLevel = sbt.librarymanagement.TrackLevel
|
||||
val TrackLevel = sbt.librarymanagement.TrackLevel
|
||||
val URLRepository = sbt.librarymanagement.URLRepository
|
||||
type URLRepository = sbt.librarymanagement.URLRepository
|
||||
val UpdateOptions = sbt.librarymanagement.UpdateOptions
|
||||
|
|
|
|||
Loading…
Reference in New Issue