mirror of https://github.com/sbt/sbt.git
Bring BuildStructure and others into internal
This commit is contained in:
parent
ce3926fbed
commit
0cc9488632
|
|
@ -4,12 +4,13 @@
|
|||
package sbt
|
||||
|
||||
import Keys._
|
||||
import sbt.internal.{ GCUtil, CommandStrings }
|
||||
import sbt.internal.util.complete.{ DefaultParsers, Parser }
|
||||
import sbt.internal.util.AttributeKey
|
||||
import DefaultParsers._
|
||||
import Def.{ ScopedKey, Setting }
|
||||
import Scope.GlobalScope
|
||||
import CommandStrings.{ CrossCommand, crossHelp, SwitchCommand, switchHelp }
|
||||
import sbt.internal.CommandStrings.{ CrossCommand, crossHelp, SwitchCommand, switchHelp }
|
||||
import java.io.File
|
||||
import sbt.internal.inc.ScalaInstance
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
package sbt
|
||||
|
||||
import scala.concurrent.duration.{ FiniteDuration, Duration }
|
||||
import sbt.internal.{ OldPlugin, Aggregation, LoadedBuild, BuildUtil, PluginDiscovery, APIMappings, BuildDependencies, GCUtil, TaskSequential }
|
||||
import sbt.internal.ConsoleProject
|
||||
import sbt.internal.util.Attributed
|
||||
import sbt.internal.util.Attributed.data
|
||||
import Scope.{ fillTaskAxis, GlobalScope, ThisScope }
|
||||
|
|
@ -23,7 +25,6 @@ import sbt.internal.inc.{ Analysis, ClassfileManager, ClasspathOptions, Compiler
|
|||
import testing.{ Framework, Runner, AnnotatedFingerprint, SubclassFingerprint }
|
||||
|
||||
import sbt.librarymanagement.{ `package` => _, _ }
|
||||
import sbt.internal.OldPlugin
|
||||
import sbt.internal.librarymanagement._
|
||||
import sbt.internal.librarymanagement.syntax._
|
||||
import sbt.internal.util._
|
||||
|
|
@ -39,7 +40,7 @@ import java.util.concurrent.{ TimeUnit, Callable }
|
|||
import sbinary.DefaultProtocol.StringFormat
|
||||
import sbt.internal.util.Cache.seqFormat
|
||||
import sbt.util.Logger
|
||||
import CommandStrings.ExportStream
|
||||
import sbt.internal.CommandStrings.ExportStream
|
||||
|
||||
import xsbti.Maybe
|
||||
import sbt.util.InterfaceUtil.{ f1, o2m }
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
package sbt
|
||||
|
||||
import sbt.internal.Load
|
||||
import sbt.internal.{ Load, BuildStructure, TaskTimings, TaskName, GCUtil }
|
||||
import sbt.internal.util.{ ErrorHandling, RMap, Show, Signals, Types }
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement.{ Resolver, UpdateReport }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package sbt
|
||||
|
||||
import sbt.internal.Load
|
||||
import sbt.internal.{ Load, BuildStructure, Act, Aggregation, SessionSettings }
|
||||
import Project._
|
||||
import Scope.GlobalScope
|
||||
import Def.{ ScopedKey, Setting }
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import testing.Framework
|
|||
import sbt.internal.util.Types.Id
|
||||
import KeyRanks._
|
||||
|
||||
import sbt.internal.{ BuildStructure, LoadedBuild, PluginDiscovery, BuildDependencies, SessionSettings }
|
||||
import sbt.io.FileFilter
|
||||
import sbt.internal.io.WatchState
|
||||
import sbt.internal.util.AttributeKey
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
*/
|
||||
package sbt
|
||||
|
||||
import sbt.internal.{ Load, EvaluateConfigurations }
|
||||
import sbt.internal.{ Load, EvaluateConfigurations, LoadedBuildUnit, Aggregation, BuildStructure, Act, Inspect, BuildUnit, Output, PluginsDebug }
|
||||
import sbt.internal.{ SettingCompletions, CommandStrings, IvyConsole, ProjectNavigation, Script, SessionSettings }
|
||||
import sbt.internal.util.{ AttributeKey, AttributeMap, complete, ConsoleOut, GlobalLogging, LineRange, MainLogging, SimpleReader, Types }
|
||||
import sbt.util.{ Level, Logger }
|
||||
|
||||
|
|
@ -31,7 +32,7 @@ final class xMain extends xsbti.AppMain {
|
|||
import BasicCommands.early
|
||||
import BasicCommandStrings.runEarly
|
||||
import BuiltinCommands.{ initialize, defaults }
|
||||
import CommandStrings.{ BootCommand, DefaultsCommand, InitCommand }
|
||||
import sbt.internal.CommandStrings.{ BootCommand, DefaultsCommand, InitCommand }
|
||||
runManaged(initialState(configuration,
|
||||
Seq(defaults, early),
|
||||
runEarly(DefaultsCommand) :: runEarly(InitCommand) :: BootCommand :: Nil)
|
||||
|
|
@ -79,7 +80,7 @@ object StandardMain {
|
|||
}
|
||||
|
||||
import DefaultParsers._
|
||||
import CommandStrings._
|
||||
import sbt.internal.CommandStrings._
|
||||
import BasicCommandStrings._
|
||||
import BasicCommands._
|
||||
import CommandUtil._
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import Project._
|
|||
import Keys.{ appConfiguration, stateBuildStructure, commands, configuration, historyPath, projectCommand, sessionSettings, shellPrompt, thisProject, thisProjectRef, watch }
|
||||
import Scope.{ GlobalScope, ThisScope }
|
||||
import Def.{ Flattened, Initialize, ScopedKey, Setting }
|
||||
import sbt.internal.Load
|
||||
import sbt.internal.{ Load, BuildStructure, LoadedBuild, LoadedBuildUnit, SettingGraph, SettingCompletions, AddSettings, SessionSettings }
|
||||
import sbt.internal.util.Eval
|
||||
import sbt.internal.util.Types.{ const, idFun }
|
||||
import sbt.internal.util.complete.DefaultParsers
|
||||
|
|
@ -354,7 +354,7 @@ object Project extends ProjectExtra {
|
|||
def isProjectLoaded(state: State): Boolean = (state has sessionSettings) && (state has stateBuildStructure)
|
||||
|
||||
def extract(state: State): Extracted = extract(session(state), structure(state))
|
||||
def extract(se: SessionSettings, st: BuildStructure): Extracted = Extracted(st, se, se.current)(showContextKey(se, st))
|
||||
private[sbt] def extract(se: SessionSettings, st: BuildStructure): Extracted = Extracted(st, se, se.current)(showContextKey(se, st))
|
||||
|
||||
def getProjectForReference(ref: Reference, structure: BuildStructure): Option[ResolvedProject] =
|
||||
ref match { case pr: ProjectRef => getProject(pr, structure); case _ => None }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package sbt
|
||||
|
||||
import sbt.internal.Load
|
||||
import sbt.internal.{ Load, LoadedBuildUnit }
|
||||
import sbt.internal.util.{ AttributeKey, Dag, Types }
|
||||
|
||||
import sbt.librarymanagement.Configuration
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import java.io.File
|
||||
import java.net.{ MalformedURLException, URL }
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import Def.{ showRelativeKey, ScopedKey }
|
||||
import Project.showContextKey
|
||||
|
|
@ -11,7 +12,7 @@ import Aggregation.{ KeyValue, Values }
|
|||
import DefaultParsers._
|
||||
import sbt.internal.util.Types.idFun
|
||||
import java.net.URI
|
||||
import CommandStrings.{ MultiTaskCommand, ShowCommand }
|
||||
import sbt.internal.CommandStrings.{ MultiTaskCommand, ShowCommand }
|
||||
import sbt.internal.util.{ AttributeEntry, AttributeKey, AttributeMap, IMap, Settings, Show, Util }
|
||||
|
||||
final class ParsedKey(val key: ScopedKey[_], val mask: ScopeMask)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.Types.const
|
||||
import sbt.internal.OldPlugin
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import Def.ScopedKey
|
||||
import Keys.{ aggregate, showSuccess, showTiming, timingFormat }
|
||||
|
|
@ -9,14 +10,14 @@ import sbt.internal.util.complete.Parser
|
|||
import sbt.internal.util.{ Dag, HList, Relation, Settings, Show, Util }
|
||||
import sbt.util.Logger
|
||||
import java.net.URI
|
||||
import Parser._
|
||||
import Parser.{ seq, failure, success }
|
||||
import collection.mutable
|
||||
import std.Transform.{ DummyTaskMap, TaskAndValue }
|
||||
|
||||
sealed trait Aggregation
|
||||
final object Aggregation {
|
||||
final case class ShowConfig(settingValues: Boolean, taskValues: Boolean, print: String => Unit, success: Boolean)
|
||||
final case class Complete[T](start: Long, stop: Long, results: Result[Seq[KeyValue[T]]], state: State)
|
||||
final case class Complete[T](start: Long, stop: Long, results: sbt.Result[Seq[KeyValue[T]]], state: State)
|
||||
final case class KeyValue[+T](key: ScopedKey[_], value: T)
|
||||
|
||||
def defaultShow(state: State, showTasks: Boolean): ShowConfig = ShowConfig(settingValues = true, taskValues = showTasks, s => state.log.info(s), success = true)
|
||||
|
|
@ -44,7 +45,7 @@ final object Aggregation {
|
|||
def showRun[T](complete: Complete[T], show: ShowConfig)(implicit display: Show[ScopedKey[_]]): Unit = {
|
||||
import complete._
|
||||
val log = state.log
|
||||
val extracted = Project extract state
|
||||
val extracted = Project.extract(state)
|
||||
val success = results match { case Value(_) => true; case Inc(_) => false }
|
||||
results.toEither.right.foreach { r => if (show.taskValues) printSettings(r, show.print) }
|
||||
if (show.success) printSuccess(start, stop, extracted, success, log)
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.Types.idFun
|
||||
import sbt.internal.util.Dag
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
|
|
@ -9,7 +10,6 @@ import Def.{ displayFull, ScopedKey, ScopeLocal, Setting }
|
|||
import BuildPaths.outputDirectory
|
||||
import Scope.GlobalScope
|
||||
import BuildStreams.Streams
|
||||
import sbt.internal.{ BuildDef, Load, OldPlugin }
|
||||
import sbt.io.syntax._
|
||||
import sbt.internal.util.{ Attributed, AttributeEntry, AttributeKey, AttributeMap, Settings }
|
||||
import sbt.internal.util.Attributed.data
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.{ Relation, Settings, Dag }
|
||||
import sbt.internal.Load
|
||||
|
||||
import java.net.URI
|
||||
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.io.Path
|
||||
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.util.Logger
|
||||
import java.io.File
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.librarymanagement.{ Configuration, Configurations, ModuleID, Resolver, SbtArtifacts, UpdateReport }
|
||||
import sbt.internal.util.Attributed
|
||||
|
||||
import sbt.internal.{ Load, LoadBuildConfiguration }
|
||||
import Def.{ ScopedKey, Setting }
|
||||
import Scoped._
|
||||
import Keys._
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import Def.Setting
|
||||
import java.net.URI
|
||||
|
|
@ -15,4 +16,4 @@ private[sbt] object GroupedAutoPlugins {
|
|||
val all: Seq[AutoPlugin] = byBuild.values.toSeq.flatten.distinct
|
||||
new GroupedAutoPlugins(all, byBuild)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.{ AttributeKey, complete, Types }
|
||||
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.Load
|
||||
import sbt.internal.util.Attributed
|
||||
import sbt.util.{ Level, Logger }
|
||||
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.Relation
|
||||
|
||||
|
|
@ -68,32 +69,32 @@ trait ExtendableKeyIndex extends KeyIndex {
|
|||
def addAggregated(scoped: ScopedKey[_], extra: BuildUtil[_]): ExtendableKeyIndex
|
||||
}
|
||||
// task axis <-> key
|
||||
private final class AKeyIndex(val data: Relation[Option[AttributeKey[_]], String]) {
|
||||
private[sbt] final class AKeyIndex(val data: Relation[Option[AttributeKey[_]], String]) {
|
||||
def add(task: Option[AttributeKey[_]], key: AttributeKey[_]): AKeyIndex = new AKeyIndex(data + (task, key.rawLabel) + (task, key.label))
|
||||
def keys(task: Option[AttributeKey[_]]): Set[String] = data.forward(task)
|
||||
def allKeys: Set[String] = data._2s.toSet
|
||||
def tasks: Set[AttributeKey[_]] = data._1s.flatten.toSet
|
||||
def tasks(key: String): Set[AttributeKey[_]] = data.reverse(key).flatten.toSet
|
||||
}
|
||||
private final class ConfigIndex(val data: Map[Option[String], AKeyIndex]) {
|
||||
private[sbt] final class ConfigIndex(val data: Map[Option[String], AKeyIndex]) {
|
||||
def add(config: Option[String], task: Option[AttributeKey[_]], key: AttributeKey[_]): ConfigIndex =
|
||||
new ConfigIndex(data updated (config, keyIndex(config).add(task, key)))
|
||||
def keyIndex(conf: Option[String]): AKeyIndex = getOr(data, conf, emptyAKeyIndex)
|
||||
def configs: Set[String] = keySet(data)
|
||||
}
|
||||
private final class ProjectIndex(val data: Map[Option[String], ConfigIndex]) {
|
||||
private[sbt] final class ProjectIndex(val data: Map[Option[String], ConfigIndex]) {
|
||||
def add(id: Option[String], config: Option[String], task: Option[AttributeKey[_]], key: AttributeKey[_]): ProjectIndex =
|
||||
new ProjectIndex(data updated (id, confIndex(id).add(config, task, key)))
|
||||
def confIndex(id: Option[String]): ConfigIndex = getOr(data, id, emptyConfigIndex)
|
||||
def projects: Set[String] = keySet(data)
|
||||
}
|
||||
private final class BuildIndex(val data: Map[Option[URI], ProjectIndex]) {
|
||||
private[sbt] final class BuildIndex(val data: Map[Option[URI], ProjectIndex]) {
|
||||
def add(build: Option[URI], project: Option[String], config: Option[String], task: Option[AttributeKey[_]], key: AttributeKey[_]): BuildIndex =
|
||||
new BuildIndex(data updated (build, projectIndex(build).add(project, config, task, key)))
|
||||
def projectIndex(build: Option[URI]): ProjectIndex = getOr(data, build, emptyProjectIndex)
|
||||
def builds: Set[URI] = keySet(data)
|
||||
}
|
||||
private final class KeyIndex0(val data: BuildIndex) extends ExtendableKeyIndex {
|
||||
private[sbt] final class KeyIndex0(val data: BuildIndex) extends ExtendableKeyIndex {
|
||||
def buildURIs: Set[URI] = data.builds
|
||||
def projects(uri: URI): Set[String] = data.projectIndex(Some(uri)).projects
|
||||
def exists(proj: Option[ResolvedReference]): Boolean =
|
||||
|
|
@ -34,7 +34,7 @@ import xsbti.compile.Compilers
|
|||
|
||||
private[sbt] object Load {
|
||||
// note that there is State passed in but not pulled out
|
||||
def defaultLoad(state: State, baseDirectory: File, log: Logger, isPlugin: Boolean = false, topLevelExtras: List[URI] = Nil): (() => Eval, sbt.BuildStructure) =
|
||||
def defaultLoad(state: State, baseDirectory: File, log: Logger, isPlugin: Boolean = false, topLevelExtras: List[URI] = Nil): (() => Eval, BuildStructure) =
|
||||
{
|
||||
val globalBase = getGlobalBase(state)
|
||||
val base = baseDirectory.getCanonicalFile
|
||||
|
|
@ -111,7 +111,7 @@ private[sbt] object Load {
|
|||
} else
|
||||
config
|
||||
|
||||
def defaultDelegates: sbt.LoadedBuild => Scope => Seq[Scope] = (lb: sbt.LoadedBuild) => {
|
||||
def defaultDelegates: LoadedBuild => Scope => Seq[Scope] = (lb: LoadedBuild) => {
|
||||
val rootProject = getRootProject(lb.units)
|
||||
def resolveRef(project: Reference): ResolvedReference = Scope.resolveReference(lb.root, rootProject, project)
|
||||
Scope.delegates(
|
||||
|
|
@ -125,15 +125,15 @@ private[sbt] object Load {
|
|||
(project, extra) => Nil
|
||||
)
|
||||
}
|
||||
def configInherit(lb: sbt.LoadedBuild, ref: ResolvedReference, config: ConfigKey, rootProject: URI => String): Seq[ConfigKey] =
|
||||
def configInherit(lb: LoadedBuild, ref: ResolvedReference, config: ConfigKey, rootProject: URI => String): Seq[ConfigKey] =
|
||||
ref match {
|
||||
case pr: ProjectRef => configInheritRef(lb, pr, config)
|
||||
case BuildRef(uri) => configInheritRef(lb, ProjectRef(uri, rootProject(uri)), config)
|
||||
}
|
||||
def configInheritRef(lb: sbt.LoadedBuild, ref: ProjectRef, config: ConfigKey): Seq[ConfigKey] =
|
||||
def configInheritRef(lb: LoadedBuild, ref: ProjectRef, config: ConfigKey): Seq[ConfigKey] =
|
||||
configurationOpt(lb.units, ref.build, ref.project, config).toList.flatMap(_.extendsConfigs).map(c => ConfigKey(c.name))
|
||||
|
||||
def projectInherit(lb: sbt.LoadedBuild, ref: ProjectRef): Seq[ProjectRef] =
|
||||
def projectInherit(lb: LoadedBuild, ref: ProjectRef): Seq[ProjectRef] =
|
||||
getProject(lb.units, ref.build, ref.project).delegates
|
||||
|
||||
// build, load, and evaluate all units.
|
||||
|
|
@ -145,7 +145,7 @@ private[sbt] object Load {
|
|||
// 6) Load all configurations using build definitions and plugins (their classpaths and loaded instances).
|
||||
// 7) Combine settings from projects, plugins, and configurations
|
||||
// 8) Evaluate settings
|
||||
def apply(rootBase: File, s: State, config: LoadBuildConfiguration): (() => Eval, sbt.BuildStructure) =
|
||||
def apply(rootBase: File, s: State, config: LoadBuildConfiguration): (() => Eval, BuildStructure) =
|
||||
{
|
||||
// load, which includes some resolution, but can't fill in project IDs yet, so follow with full resolution
|
||||
val loaded = resolveProjects(load(rootBase, s, config))
|
||||
|
|
@ -157,7 +157,7 @@ private[sbt] object Load {
|
|||
Project.checkTargets(data) foreach sys.error
|
||||
val index = structureIndex(data, settings, loaded.extra(data), projects)
|
||||
val streams = mkStreams(projects, loaded.root, data)
|
||||
(rootEval, new sbt.BuildStructure(projects, loaded.root, settings, data, index, streams, delegates, config.scopeLocal))
|
||||
(rootEval, new BuildStructure(projects, loaded.root, settings, data, index, streams, delegates, config.scopeLocal))
|
||||
}
|
||||
|
||||
// map dependencies on the special tasks:
|
||||
|
|
@ -190,7 +190,7 @@ private[sbt] object Load {
|
|||
def setDefinitionKey[T](tk: Task[T], key: ScopedKey[_]): Task[T] =
|
||||
if (isDummy(tk)) tk else Task(tk.info.set(Keys.taskDefinitionKey, key), tk.work)
|
||||
|
||||
def structureIndex(data: Settings[Scope], settings: Seq[Setting[_]], extra: KeyIndex => BuildUtil[_], projects: Map[URI, LoadedBuildUnit]): sbt.StructureIndex =
|
||||
def structureIndex(data: Settings[Scope], settings: Seq[Setting[_]], extra: KeyIndex => BuildUtil[_], projects: Map[URI, LoadedBuildUnit]): StructureIndex =
|
||||
{
|
||||
val keys = Index.allKeys(settings)
|
||||
val attributeKeys = Index.attributeKeys(data) ++ keys.map(_.key)
|
||||
|
|
@ -198,21 +198,21 @@ private[sbt] object Load {
|
|||
val projectsMap = projects.mapValues(_.defined.keySet)
|
||||
val keyIndex = KeyIndex(scopedKeys, projectsMap)
|
||||
val aggIndex = KeyIndex.aggregate(scopedKeys, extra(keyIndex), projectsMap)
|
||||
new sbt.StructureIndex(Index.stringToKeyMap(attributeKeys), Index.taskToKeyMap(data), Index.triggers(data), keyIndex, aggIndex)
|
||||
new StructureIndex(Index.stringToKeyMap(attributeKeys), Index.taskToKeyMap(data), Index.triggers(data), keyIndex, aggIndex)
|
||||
}
|
||||
|
||||
// Reevaluates settings after modifying them. Does not recompile or reload any build components.
|
||||
def reapply(newSettings: Seq[Setting[_]], structure: sbt.BuildStructure)(implicit display: Show[ScopedKey[_]]): sbt.BuildStructure =
|
||||
def reapply(newSettings: Seq[Setting[_]], structure: BuildStructure)(implicit display: Show[ScopedKey[_]]): BuildStructure =
|
||||
{
|
||||
val transformed = finalTransforms(newSettings)
|
||||
val newData = Def.make(transformed)(structure.delegates, structure.scopeLocal, display)
|
||||
val newIndex = structureIndex(newData, transformed, index => BuildUtil(structure.root, structure.units, index, newData), structure.units)
|
||||
val newStreams = mkStreams(structure.units, structure.root, newData)
|
||||
new sbt.BuildStructure(units = structure.units, root = structure.root, settings = transformed, data = newData, index = newIndex, streams = newStreams, delegates = structure.delegates, scopeLocal = structure.scopeLocal)
|
||||
new BuildStructure(units = structure.units, root = structure.root, settings = transformed, data = newData, index = newIndex, streams = newStreams, delegates = structure.delegates, scopeLocal = structure.scopeLocal)
|
||||
}
|
||||
|
||||
def isProjectThis(s: Setting[_]) = s.key.scope.project match { case This | Select(ThisProject) => true; case _ => false }
|
||||
def buildConfigurations(loaded: sbt.LoadedBuild, rootProject: URI => String, injectSettings: InjectSettings): Seq[Setting[_]] =
|
||||
def buildConfigurations(loaded: LoadedBuild, rootProject: URI => String, injectSettings: InjectSettings): Seq[Setting[_]] =
|
||||
{
|
||||
((loadedBuild in GlobalScope :== loaded) +:
|
||||
transformProjectOnly(loaded.root, rootProject, injectSettings.global)) ++
|
||||
|
|
@ -237,7 +237,7 @@ private[sbt] object Load {
|
|||
}
|
||||
}
|
||||
@deprecated("Does not account for AutoPlugins and will be made private.", "0.13.2")
|
||||
def pluginGlobalSettings(loaded: sbt.LoadedBuild): Seq[Setting[_]] =
|
||||
def pluginGlobalSettings(loaded: LoadedBuild): Seq[Setting[_]] =
|
||||
loaded.units.toSeq flatMap {
|
||||
case (_, build) =>
|
||||
build.unit.plugins.detected.plugins.values flatMap { _.globalSettings }
|
||||
|
|
@ -249,13 +249,13 @@ private[sbt] object Load {
|
|||
Project.transform(Scope.resolveScope(thisScope, uri, rootProject), settings)
|
||||
def projectScope(project: Reference): Scope = Scope(Select(project), Global, Global, Global)
|
||||
|
||||
def lazyEval(unit: sbt.BuildUnit): () => Eval =
|
||||
def lazyEval(unit: BuildUnit): () => Eval =
|
||||
{
|
||||
lazy val eval = mkEval(unit)
|
||||
() => eval
|
||||
}
|
||||
def mkEval(unit: sbt.BuildUnit): Eval = mkEval(unit.definitions, unit.plugins, unit.plugins.pluginData.scalacOptions)
|
||||
def mkEval(defs: sbt.LoadedDefinitions, plugs: sbt.LoadedPlugins, options: Seq[String]): Eval =
|
||||
def mkEval(unit: BuildUnit): Eval = mkEval(unit.definitions, unit.plugins, unit.plugins.pluginData.scalacOptions)
|
||||
def mkEval(defs: LoadedDefinitions, plugs: LoadedPlugins, options: Seq[String]): Eval =
|
||||
mkEval(defs.target ++ plugs.classpath, defs.base, options)
|
||||
def mkEval(classpath: Seq[File], base: File, options: Seq[String]): Eval =
|
||||
new Eval(options, classpath, s => new ConsoleReporter(s), Some(evalOutputDirectory(base)))
|
||||
|
|
@ -288,7 +288,7 @@ private[sbt] object Load {
|
|||
if (srcs.isEmpty) const(LoadedSbtFile.empty)
|
||||
else EvaluateConfigurations(eval(), srcs, imports)
|
||||
|
||||
def load(file: File, s: State, config: LoadBuildConfiguration): sbt.PartBuild =
|
||||
def load(file: File, s: State, config: LoadBuildConfiguration): PartBuild =
|
||||
load(file, builtinLoader(s, config.copy(pluginManagement = config.pluginManagement.shift, extraBuilds = Nil)), config.extraBuilds.toList)
|
||||
def builtinLoader(s: State, config: LoadBuildConfiguration): BuildLoader =
|
||||
{
|
||||
|
|
@ -298,19 +298,19 @@ private[sbt] object Load {
|
|||
val components = BuildLoader.components(resolver, build, full = BuildLoader.componentLoader)
|
||||
BuildLoader(components, fail, s, config)
|
||||
}
|
||||
def load(file: File, loaders: BuildLoader, extra: List[URI]): sbt.PartBuild = loadURI(IO.directoryURI(file), loaders, extra)
|
||||
def loadURI(uri: URI, loaders: BuildLoader, extra: List[URI]): sbt.PartBuild =
|
||||
def load(file: File, loaders: BuildLoader, extra: List[URI]): PartBuild = loadURI(IO.directoryURI(file), loaders, extra)
|
||||
def loadURI(uri: URI, loaders: BuildLoader, extra: List[URI]): PartBuild =
|
||||
{
|
||||
IO.assertAbsolute(uri)
|
||||
val (referenced, map, newLoaders) = loadAll(uri :: extra, Map.empty, loaders, Map.empty)
|
||||
checkAll(referenced, map)
|
||||
val build = new sbt.PartBuild(uri, map)
|
||||
val build = new PartBuild(uri, map)
|
||||
newLoaders transformAll build
|
||||
}
|
||||
def addOverrides(unit: sbt.BuildUnit, loaders: BuildLoader): BuildLoader =
|
||||
def addOverrides(unit: BuildUnit, loaders: BuildLoader): BuildLoader =
|
||||
loaders updatePluginManagement PluginManagement.extractOverrides(unit.plugins.fullClasspath)
|
||||
|
||||
def addResolvers(unit: sbt.BuildUnit, isRoot: Boolean, loaders: BuildLoader): BuildLoader =
|
||||
def addResolvers(unit: BuildUnit, isRoot: Boolean, loaders: BuildLoader): BuildLoader =
|
||||
unit.definitions.builds.flatMap(_.buildLoaders).toList match {
|
||||
case Nil => loaders
|
||||
case x :: xs =>
|
||||
|
|
@ -319,7 +319,7 @@ private[sbt] object Load {
|
|||
if (isRoot) loaders.setRoot(resolver) else loaders.addNonRoot(unit.uri, resolver)
|
||||
}
|
||||
|
||||
def loaded(unit: sbt.BuildUnit): (sbt.PartBuildUnit, List[ProjectReference]) =
|
||||
def loaded(unit: BuildUnit): (PartBuildUnit, List[ProjectReference]) =
|
||||
{
|
||||
val defined = projects(unit)
|
||||
if (defined.isEmpty) sys.error("No projects defined in build unit " + unit)
|
||||
|
|
@ -332,16 +332,16 @@ private[sbt] object Load {
|
|||
val explicitRoots = unit.definitions.builds.flatMap(_.rootProject)
|
||||
val projectsInRoot = if (explicitRoots.isEmpty) defined.filter(isRoot) else explicitRoots
|
||||
val rootProjects = if (projectsInRoot.isEmpty) defined.head :: Nil else projectsInRoot
|
||||
(new sbt.PartBuildUnit(unit, defined.map(d => (d.id, d)).toMap, rootProjects.map(_.id), buildSettings(unit)), externals)
|
||||
(new PartBuildUnit(unit, defined.map(d => (d.id, d)).toMap, rootProjects.map(_.id), buildSettings(unit)), externals)
|
||||
}
|
||||
def buildSettings(unit: sbt.BuildUnit): Seq[Setting[_]] =
|
||||
def buildSettings(unit: BuildUnit): Seq[Setting[_]] =
|
||||
{
|
||||
val buildScope = GlobalScope.copy(project = Select(BuildRef(unit.uri)))
|
||||
val resolve = Scope.resolveBuildScope(buildScope, unit.uri)
|
||||
Project.transform(resolve, unit.definitions.builds.flatMap(_.settings))
|
||||
}
|
||||
|
||||
@tailrec def loadAll(bases: List[URI], references: Map[URI, List[ProjectReference]], loaders: BuildLoader, builds: Map[URI, sbt.PartBuildUnit]): (Map[URI, List[ProjectReference]], Map[URI, sbt.PartBuildUnit], BuildLoader) =
|
||||
@tailrec def loadAll(bases: List[URI], references: Map[URI, List[ProjectReference]], loaders: BuildLoader, builds: Map[URI, PartBuildUnit]): (Map[URI, List[ProjectReference]], Map[URI, PartBuildUnit], BuildLoader) =
|
||||
bases match {
|
||||
case b :: bs =>
|
||||
if (builds contains b)
|
||||
|
|
@ -368,7 +368,7 @@ private[sbt] object Load {
|
|||
else if (!base.exists)
|
||||
IO createDirectory base
|
||||
}
|
||||
def resolveAll(builds: Map[URI, sbt.PartBuildUnit]): Map[URI, sbt.LoadedBuildUnit] =
|
||||
def resolveAll(builds: Map[URI, PartBuildUnit]): Map[URI, LoadedBuildUnit] =
|
||||
{
|
||||
val rootProject = getRootProject(builds)
|
||||
builds map {
|
||||
|
|
@ -376,7 +376,7 @@ private[sbt] object Load {
|
|||
(uri, unit.resolveRefs(ref => Scope.resolveProjectRef(uri, rootProject, ref)))
|
||||
}
|
||||
}
|
||||
def checkAll(referenced: Map[URI, List[ProjectReference]], builds: Map[URI, sbt.PartBuildUnit]): Unit = {
|
||||
def checkAll(referenced: Map[URI, List[ProjectReference]], builds: Map[URI, PartBuildUnit]): Unit = {
|
||||
val rootProject = getRootProject(builds)
|
||||
for ((uri, refs) <- referenced; ref <- refs) {
|
||||
val ProjectRef(refURI, refID) = Scope.resolveProjectRef(uri, rootProject, ref)
|
||||
|
|
@ -398,7 +398,7 @@ private[sbt] object Load {
|
|||
}
|
||||
p => p.copy(base = resolve(p.base))
|
||||
}
|
||||
def resolveProjects(loaded: sbt.PartBuild): sbt.LoadedBuild =
|
||||
def resolveProjects(loaded: PartBuild): LoadedBuild =
|
||||
{
|
||||
val rootProject = getRootProject(loaded.units)
|
||||
val units = loaded.units map {
|
||||
|
|
@ -406,15 +406,15 @@ private[sbt] object Load {
|
|||
IO.assertAbsolute(uri)
|
||||
(uri, resolveProjects(uri, unit, rootProject))
|
||||
}
|
||||
new sbt.LoadedBuild(loaded.root, units)
|
||||
new LoadedBuild(loaded.root, units)
|
||||
}
|
||||
def resolveProjects(uri: URI, unit: sbt.PartBuildUnit, rootProject: URI => String): sbt.LoadedBuildUnit =
|
||||
def resolveProjects(uri: URI, unit: PartBuildUnit, rootProject: URI => String): LoadedBuildUnit =
|
||||
{
|
||||
IO.assertAbsolute(uri)
|
||||
val resolve = (_: Project).resolve(ref => Scope.resolveProjectRef(uri, rootProject, ref))
|
||||
new sbt.LoadedBuildUnit(unit.unit, unit.defined mapValues resolve, unit.rootProjects, unit.buildSettings)
|
||||
new LoadedBuildUnit(unit.unit, unit.defined mapValues resolve, unit.rootProjects, unit.buildSettings)
|
||||
}
|
||||
def projects(unit: sbt.BuildUnit): Seq[Project] =
|
||||
def projects(unit: BuildUnit): Seq[Project] =
|
||||
{
|
||||
// we don't have the complete build graph loaded, so we don't have the rootProject function yet.
|
||||
// Therefore, we use resolveProjectBuild instead of resolveProjectRef. After all builds are loaded, we can fully resolve ProjectReferences.
|
||||
|
|
@ -422,14 +422,14 @@ private[sbt] object Load {
|
|||
// although the default loader will resolve the project base directory, other loaders may not, so run resolveBase here as well
|
||||
unit.definitions.projects.map(resolveBuild compose resolveBase(unit.localBase))
|
||||
}
|
||||
def getRootProject(map: Map[URI, sbt.BuildUnitBase]): URI => String =
|
||||
def getRootProject(map: Map[URI, BuildUnitBase]): URI => String =
|
||||
uri => getBuild(map, uri).rootProjects.headOption getOrElse emptyBuild(uri)
|
||||
def getConfiguration(map: Map[URI, sbt.LoadedBuildUnit], uri: URI, id: String, conf: ConfigKey): Configuration =
|
||||
def getConfiguration(map: Map[URI, LoadedBuildUnit], uri: URI, id: String, conf: ConfigKey): Configuration =
|
||||
configurationOpt(map, uri, id, conf) getOrElse noConfiguration(uri, id, conf.name)
|
||||
def configurationOpt(map: Map[URI, sbt.LoadedBuildUnit], uri: URI, id: String, conf: ConfigKey): Option[Configuration] =
|
||||
def configurationOpt(map: Map[URI, LoadedBuildUnit], uri: URI, id: String, conf: ConfigKey): Option[Configuration] =
|
||||
getProject(map, uri, id).configurations.find(_.name == conf.name)
|
||||
|
||||
def getProject(map: Map[URI, sbt.LoadedBuildUnit], uri: URI, id: String): ResolvedProject =
|
||||
def getProject(map: Map[URI, LoadedBuildUnit], uri: URI, id: String): ResolvedProject =
|
||||
getBuild(map, uri).defined.getOrElse(id, noProject(uri, id))
|
||||
def getBuild[T](map: Map[URI, T], uri: URI): T =
|
||||
map.getOrElse(uri, noBuild(uri))
|
||||
|
|
@ -439,7 +439,7 @@ private[sbt] object Load {
|
|||
def noProject(uri: URI, id: String) = sys.error(s"No project '$id' defined in '$uri'.")
|
||||
def noConfiguration(uri: URI, id: String, conf: String) = sys.error(s"No configuration '$conf' defined in project '$id' in '$uri'")
|
||||
|
||||
def loadUnit(uri: URI, localBase: File, s: State, config: LoadBuildConfiguration): sbt.BuildUnit =
|
||||
def loadUnit(uri: URI, localBase: File, s: State, config: LoadBuildConfiguration): BuildUnit =
|
||||
{
|
||||
val normBase = localBase.getCanonicalFile
|
||||
val defDir = projectStandard(normBase)
|
||||
|
|
@ -485,8 +485,8 @@ private[sbt] object Load {
|
|||
val valDefinitions = memoSettings.values.foldLeft(DefinedSbtValues.empty) { (prev, sbtFile) =>
|
||||
prev.zip(sbtFile.definitions)
|
||||
}
|
||||
val loadedDefs = new sbt.LoadedDefinitions(defDir, Nil, plugs.loader, defs, loadedProjects, plugs.detected.builds.names, valDefinitions)
|
||||
new sbt.BuildUnit(uri, normBase, loadedDefs, plugs)
|
||||
val loadedDefs = new LoadedDefinitions(defDir, Nil, plugs.loader, defs, loadedProjects, plugs.detected.builds.names, valDefinitions)
|
||||
new BuildUnit(uri, normBase, loadedDefs, plugs)
|
||||
}
|
||||
|
||||
private[this] def autoID(localBase: File, context: PluginManagement.Context, existingIDs: Seq[String]): String =
|
||||
|
|
@ -545,7 +545,7 @@ private[sbt] object Load {
|
|||
private[this] def loadTransitive(
|
||||
newProjects: Seq[Project],
|
||||
buildBase: File,
|
||||
plugins: sbt.LoadedPlugins,
|
||||
plugins: LoadedPlugins,
|
||||
eval: () => Eval,
|
||||
injectSettings: InjectSettings,
|
||||
acc: Seq[Project],
|
||||
|
|
@ -651,7 +651,7 @@ private[sbt] object Load {
|
|||
private[this] def resolveProject(
|
||||
rawProject: Project,
|
||||
configFiles: Seq[LoadedSbtFile],
|
||||
loadedPlugins: sbt.LoadedPlugins,
|
||||
loadedPlugins: LoadedPlugins,
|
||||
globalUserSettings: InjectSettings,
|
||||
memoSettings: mutable.Map[File, LoadedSbtFile],
|
||||
log: Logger): Project = {
|
||||
|
|
@ -714,7 +714,7 @@ private[sbt] object Load {
|
|||
private[this] def discoverProjects(
|
||||
auto: AddSettings,
|
||||
projectBase: File,
|
||||
loadedPlugins: sbt.LoadedPlugins,
|
||||
loadedPlugins: LoadedPlugins,
|
||||
eval: () => Eval,
|
||||
memoSettings: mutable.Map[File, LoadedSbtFile]): DiscoveredProjects = {
|
||||
|
||||
|
|
@ -791,7 +791,7 @@ private[sbt] object Load {
|
|||
case Some(gp) => config.copy(injectSettings = config.injectSettings.copy(project = gp.inject))
|
||||
case None => config
|
||||
}
|
||||
def plugins(dir: File, s: State, config: LoadBuildConfiguration): sbt.LoadedPlugins =
|
||||
def plugins(dir: File, s: State, config: LoadBuildConfiguration): LoadedPlugins =
|
||||
if (hasDefinition(dir))
|
||||
buildPlugins(dir, s, enableSbtPlugin(activateGlobalPlugin(config)))
|
||||
else
|
||||
|
|
@ -802,12 +802,12 @@ private[sbt] object Load {
|
|||
import sbt.io.syntax._
|
||||
(dir * -GlobFilter(DefaultTargetName)).get.nonEmpty
|
||||
}
|
||||
def noPlugins(dir: File, config: LoadBuildConfiguration): sbt.LoadedPlugins =
|
||||
def noPlugins(dir: File, config: LoadBuildConfiguration): LoadedPlugins =
|
||||
loadPluginDefinition(dir, config, PluginData(config.globalPluginClasspath, None, None))
|
||||
def buildPlugins(dir: File, s: State, config: LoadBuildConfiguration): sbt.LoadedPlugins =
|
||||
def buildPlugins(dir: File, s: State, config: LoadBuildConfiguration): LoadedPlugins =
|
||||
loadPluginDefinition(dir, config, buildPluginDefinition(dir, s, config))
|
||||
|
||||
def loadPluginDefinition(dir: File, config: LoadBuildConfiguration, pluginData: PluginData): sbt.LoadedPlugins =
|
||||
def loadPluginDefinition(dir: File, config: LoadBuildConfiguration, pluginData: PluginData): LoadedPlugins =
|
||||
{
|
||||
val (definitionClasspath, pluginLoader) = pluginDefinitionLoader(config, pluginData)
|
||||
loadPlugins(dir, pluginData.copy(dependencyClasspath = definitionClasspath), pluginLoader)
|
||||
|
|
@ -852,8 +852,8 @@ private[sbt] object Load {
|
|||
def loadDefinition(loader: ClassLoader, definition: String): BuildDef =
|
||||
ModuleUtilities.getObject(definition, loader).asInstanceOf[BuildDef]
|
||||
|
||||
def loadPlugins(dir: File, data: PluginData, loader: ClassLoader): sbt.LoadedPlugins =
|
||||
new sbt.LoadedPlugins(dir, data, loader, PluginDiscovery.discoverAll(data, loader))
|
||||
def loadPlugins(dir: File, data: PluginData, loader: ClassLoader): LoadedPlugins =
|
||||
new LoadedPlugins(dir, data, loader, PluginDiscovery.discoverAll(data, loader))
|
||||
|
||||
@deprecated("Use PluginDiscovery.onClasspath", "0.13.2")
|
||||
def onClasspath(classpath: Seq[File])(url: URL): Boolean =
|
||||
|
|
@ -866,17 +866,17 @@ private[sbt] object Load {
|
|||
def discover(analysis: Analysis, subclasses: String*): Seq[String] =
|
||||
PluginDiscovery.sourceModuleNames(analysis, subclasses: _*)
|
||||
|
||||
def initialSession(structure: sbt.BuildStructure, rootEval: () => Eval, s: State): SessionSettings = {
|
||||
def initialSession(structure: BuildStructure, rootEval: () => Eval, s: State): SessionSettings = {
|
||||
val session = s get Keys.sessionSettings
|
||||
val currentProject = session map (_.currentProject) getOrElse Map.empty
|
||||
val currentBuild = session map (_.currentBuild) filter (uri => structure.units.keys exists (uri ==)) getOrElse structure.root
|
||||
new SessionSettings(currentBuild, projectMap(structure, currentProject), structure.settings, Map.empty, Nil, rootEval)
|
||||
}
|
||||
|
||||
def initialSession(structure: sbt.BuildStructure, rootEval: () => Eval): SessionSettings =
|
||||
def initialSession(structure: BuildStructure, rootEval: () => Eval): SessionSettings =
|
||||
new SessionSettings(structure.root, projectMap(structure, Map.empty), structure.settings, Map.empty, Nil, rootEval)
|
||||
|
||||
def projectMap(structure: sbt.BuildStructure, current: Map[URI, String]): Map[URI, String] =
|
||||
def projectMap(structure: BuildStructure, current: Map[URI, String]): Map[URI, String] =
|
||||
{
|
||||
val units = structure.units
|
||||
val getRoot = getRootProject(units)
|
||||
|
|
@ -893,7 +893,7 @@ private[sbt] object Load {
|
|||
@deprecated("Use BuildUtil.baseImports", "0.13.0")
|
||||
def baseImports = BuildUtil.baseImports
|
||||
@deprecated("Use BuildUtil.checkCycles", "0.13.0")
|
||||
def checkCycles(units: Map[URI, sbt.LoadedBuildUnit]): Unit = BuildUtil.checkCycles(units)
|
||||
def checkCycles(units: Map[URI, LoadedBuildUnit]): Unit = BuildUtil.checkCycles(units)
|
||||
@deprecated("Use BuildUtil.importAll", "0.13.0")
|
||||
def importAll(values: Seq[String]): Seq[String] = BuildUtil.importAll(values)
|
||||
@deprecated("Use BuildUtil.importAllRoot", "0.13.0")
|
||||
|
|
@ -901,7 +901,7 @@ private[sbt] object Load {
|
|||
@deprecated("Use BuildUtil.rootedNames", "0.13.0")
|
||||
def rootedName(s: String): String = BuildUtil.rootedName(s)
|
||||
@deprecated("Use BuildUtil.getImports", "0.13.0")
|
||||
def getImports(unit: sbt.BuildUnit): Seq[String] = BuildUtil.getImports(unit)
|
||||
def getImports(unit: BuildUnit): Seq[String] = BuildUtil.getImports(unit)
|
||||
|
||||
def referenced[PR <: ProjectReference](definitions: Seq[ProjectDefinition[PR]]): Seq[PR] = definitions flatMap { _.referenced }
|
||||
|
||||
|
|
@ -909,7 +909,7 @@ private[sbt] object Load {
|
|||
final case class InjectSettings(global: Seq[Setting[_]], project: Seq[Setting[_]], projectLoaded: ClassLoader => Seq[Setting[_]])
|
||||
|
||||
@deprecated("Use BuildUtil.apply", "0.13.0")
|
||||
def buildUtil(root: URI, units: Map[URI, sbt.LoadedBuildUnit], keyIndex: KeyIndex, data: Settings[Scope]): BuildUtil[ResolvedProject] = BuildUtil(root, units, keyIndex, data)
|
||||
def buildUtil(root: URI, units: Map[URI, LoadedBuildUnit], keyIndex: KeyIndex, data: Settings[Scope]): BuildUtil[ResolvedProject] = BuildUtil(root, units, keyIndex, data)
|
||||
}
|
||||
|
||||
final case class LoadBuildConfiguration(
|
||||
|
|
@ -917,9 +917,9 @@ final case class LoadBuildConfiguration(
|
|||
classpath: Seq[Attributed[File]],
|
||||
loader: ClassLoader,
|
||||
compilers: Compilers,
|
||||
evalPluginDef: (sbt.BuildStructure, State) => PluginData,
|
||||
evalPluginDef: (BuildStructure, State) => PluginData,
|
||||
definesClass: DefinesClass,
|
||||
delegates: sbt.LoadedBuild => Scope => Seq[Scope],
|
||||
delegates: LoadedBuild => Scope => Seq[Scope],
|
||||
scopeLocal: ScopeLocal,
|
||||
pluginManagement: PluginManagement,
|
||||
injectSettings: Load.InjectSettings,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import Def.Setting
|
||||
import java.io.File
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.{ Show, Types }
|
||||
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.Attributed
|
||||
import sbt.internal.{ BuildDef, IncompatiblePluginsException, OldPlugin }
|
||||
// import sbt.internal.{ BuildDef, IncompatiblePluginsException, OldPlugin }
|
||||
import java.io.File
|
||||
import java.net.URL
|
||||
import Attributed.data
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import Keys.Classpath
|
||||
import Def.Setting
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.{ AttributeKey, Dag, Relation, Util }
|
||||
import sbt.util.Logger
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
* Copyright 2008, 2009, 2010, 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.Load
|
||||
import sbt.internal.util.complete
|
||||
|
||||
import ProjectNavigation._
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.AttributeKey
|
||||
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.{ Load, EvaluateConfigurations }
|
||||
import sbt.librarymanagement.Configurations
|
||||
|
||||
import sbt.util.Level
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.{ complete, LineRange, RangePosition, Types }
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.Load
|
||||
import sbt.internal.util.{ AttributeKey, complete, Relation, Settings, Show, Types, Util }
|
||||
|
||||
import sbt.librarymanagement.Configuration
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright 2011 Mark Harrah, Eugene Yokota
|
||||
*/
|
||||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.Show
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import Def.{ displayFull, ScopedKey }
|
||||
import Keys.taskDefinitionKey
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import Def._
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import sbt.internal.util.RMap
|
||||
|
||||
|
|
@ -7,7 +7,7 @@ import scala.reflect.runtime.universe._
|
|||
private[sbt] object SbtRefactorings {
|
||||
|
||||
import sbt.internal.parser.SbtParser.{ END_OF_LINE, FAKE_FILE }
|
||||
import sbt.SessionSettings.{ SessionSetting, SbtConfigFile }
|
||||
import sbt.internal.SessionSettings.{ SessionSetting, SbtConfigFile }
|
||||
|
||||
val EMPTY_STRING = ""
|
||||
val REVERSE_ORDERING_INT = Ordering[Int].reverse
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package sbt
|
|||
|
||||
import Project._
|
||||
import sbt.internal.util.Types.{ idFun, some }
|
||||
import TestBuild._
|
||||
import sbt.internal.TestBuild._
|
||||
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package sbt
|
|||
|
||||
import Def.{ displayFull, displayMasked, ScopedKey }
|
||||
import java.net.URI
|
||||
import sbt.internal.{ TestBuild, Resolve }
|
||||
import TestBuild._
|
||||
import sbt.internal.util.complete._
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import java.io._
|
|||
|
||||
import org.specs2.mutable.Specification
|
||||
|
||||
import sbt.internal.{ Load, BuildDef, OldPlugin }
|
||||
import sbt.internal._
|
||||
import sbt.internal.util.{ AttributeEntry, AttributeMap, ConsoleOut, GlobalLogging, MainLogging, Settings }
|
||||
|
||||
object PluginCommandTestPlugin0 extends AutoPlugin
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt
|
||||
package internal
|
||||
|
||||
import Def.{ ScopedKey, Setting }
|
||||
import sbt.internal.util.{ AttributeKey, AttributeMap, Relation, Settings }
|
||||
Loading…
Reference in New Issue