diff --git a/MIGRATION.md b/MIGRATION.md index e9e3e026b..eeeef930d 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,7 +1,7 @@ Migration notes =============== -- Build definition is based on Scala 2.11.8 +- Build definition is based on Scala 2.12.1 - Build.scala style builds are gone. Use multi-project `build.sbt`. - `Project(...)` constructor is restricted down to two parameters. Use `project` instead. - `sbt.Plugin` is also gone. Use auto plugins. @@ -13,10 +13,3 @@ Migration notes - Renames early command feature from `--` to `early()`. - Log options `-error`, `-warn`, `-info`, `-debug` are added as shorthand for `"early(error)"` etc. - `sbt.Process` and `sbt.ProcessExtra` are gone. Use `scala.sys.process` instead. - -#### Additional import required - -Implicit conversions are moved to `sbt.syntax`. Add the following imports to auto plugins -or `project/*.scala`. - - import sbt._, syntax._, Keys._ diff --git a/main-settings/src/main/scala/sbt/Append.scala b/main-settings/src/main/scala/sbt/Append.scala index b44ce8090..24b9447f1 100644 --- a/main-settings/src/main/scala/sbt/Append.scala +++ b/main-settings/src/main/scala/sbt/Append.scala @@ -4,6 +4,8 @@ import java.io.File import Def.Classpath import scala.annotation.implicitNotFound import sbt.internal.util.Attributed +import Def.Initialize +import reflect.internal.annotations.compileTimeOnly object Append { @implicitNotFound(msg = "No implicit for Append.Value[${A}, ${B}] found,\n so ${B} cannot be appended to ${A}") @@ -24,6 +26,14 @@ object Append { def appendValues(a: Seq[T], b: Seq[V]): Seq[T] = a ++ (b map { x => (x: T) }) def appendValue(a: Seq[T], b: V): Seq[T] = a :+ (b: T) } + @compileTimeOnly("This can be used in += only.") + implicit def appendTaskValueSeq[T, V <: T]: Value[Seq[Task[T]], Initialize[Task[V]]] = new Value[Seq[Task[T]], Initialize[Task[V]]] { + def appendValue(a: Seq[Task[T]], b: Initialize[Task[V]]): Seq[Task[T]] = ??? + } + @compileTimeOnly("This can be used in += only.") + implicit def appendTaskKeySeq[T, V <: T]: Value[Seq[Task[T]], TaskKey[V]] = new Value[Seq[Task[T]], TaskKey[V]] { + def appendValue(a: Seq[Task[T]], b: TaskKey[V]): Seq[Task[T]] = ??? + } implicit def appendList[T, V <: T]: Sequence[List[T], List[V], V] = new Sequence[List[T], List[V], V] { def appendValues(a: List[T], b: List[V]): List[T] = a ::: b def appendValue(a: List[T], b: V): List[T] = a :+ b diff --git a/main-settings/src/main/scala/sbt/std/TaskMacro.scala b/main-settings/src/main/scala/sbt/std/TaskMacro.scala index c12900150..42aca5cde 100644 --- a/main-settings/src/main/scala/sbt/std/TaskMacro.scala +++ b/main-settings/src/main/scala/sbt/std/TaskMacro.scala @@ -161,9 +161,23 @@ object TaskMacro { /** Implementation of += macro for settings. */ def settingAppend1Impl[T: c.WeakTypeTag, U: c.WeakTypeTag](c: blackbox.Context)(v: c.Expr[U])(a: c.Expr[Append.Value[T, U]]): c.Expr[Setting[T]] = { - val init = SettingMacro.settingMacroImpl[U](c)(v) - val append = appendMacroImpl(c)(init.tree, a.tree)(Append1InitName) - c.Expr[Setting[T]](append) + import c.universe._ + val ttpe = c.weakTypeOf[T] + val typeArgs = ttpe.typeArgs + v.tree.tpe match { + // To allow Initialize[Task[A]] in the position of += RHS, we're going to call "taskValue" automatically. + case tpe if typeArgs.nonEmpty && (tpe weak_<:< c.weakTypeOf[Initialize[_]]) => + c.macroApplication match { + case Apply(Apply(TypeApply(Select(preT, nmeT), targs), _), _) => + val tree = Apply(TypeApply(Select(preT, TermName("+=").encodedName), TypeTree(typeArgs.head) :: Nil), Select(v.tree, TermName("taskValue").encodedName) :: Nil) + c.Expr[Setting[T]](tree) + case x => ContextUtil.unexpectedTree(x) + } + case _ => + val init = SettingMacro.settingMacroImpl[U](c)(v) + val append = appendMacroImpl(c)(init.tree, a.tree)(Append1InitName) + c.Expr[Setting[T]](append) + } } /** Implementation of ++= macro for tasks. */ def taskAppendNImpl[T: c.WeakTypeTag, U: c.WeakTypeTag](c: blackbox.Context)(vs: c.Expr[U])(a: c.Expr[Append.Values[T, U]]): c.Expr[Setting[Task[T]]] = @@ -179,7 +193,6 @@ object TaskMacro { val append = appendMacroImpl(c)(init.tree, a.tree)(AppendNInitName) c.Expr[Setting[T]](append) } - /** Implementation of -= macro for tasks. */ def taskRemove1Impl[T: c.WeakTypeTag, U: c.WeakTypeTag](c: blackbox.Context)(v: c.Expr[U])(r: c.Expr[Remove.Value[T, U]]): c.Expr[Setting[Task[T]]] = { @@ -213,8 +226,8 @@ object TaskMacro { { import c.universe._ c.macroApplication match { - case Apply(Apply(TypeApply(Select(preT, nmeT), targs), _), a) => - Apply(Apply(TypeApply(Select(preT, TermName(newName).encodedName), targs), init :: sourcePosition(c).tree :: Nil), a) + case Apply(Apply(TypeApply(Select(preT, nmeT), targs), _), _) => + Apply(Apply(TypeApply(Select(preT, TermName(newName).encodedName), targs), init :: sourcePosition(c).tree :: Nil), append :: Nil) case x => ContextUtil.unexpectedTree(x) } } diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index b1ab2a028..cf233f7cd 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -262,7 +262,7 @@ object Defaults extends BuildCommon { unmanagedResources := collectFiles(unmanagedResourceDirectories, includeFilter in unmanagedResources, excludeFilter in unmanagedResources).value, watchSources in ConfigGlobal ++= unmanagedResources.value, resourceGenerators :== Nil, - resourceGenerators += (Def.task { PluginDiscovery.writeDescriptors(discoveredSbtPlugins.value, resourceManaged.value) }).taskValue, + resourceGenerators += Def.task { PluginDiscovery.writeDescriptors(discoveredSbtPlugins.value, resourceManaged.value) }, managedResources := generate(resourceGenerators).value, resources := Classpaths.concat(managedResources, unmanagedResources).value ) diff --git a/main/src/main/scala/sbt/Keys.scala b/main/src/main/scala/sbt/Keys.scala index 5f609f5eb..90f7fb6a6 100644 --- a/main/src/main/scala/sbt/Keys.scala +++ b/main/src/main/scala/sbt/Keys.scala @@ -323,7 +323,7 @@ object Keys { val classpathConfiguration = TaskKey[Configuration]("classpath-configuration", "The configuration used to define the classpath.", CTask) val ivyConfiguration = TaskKey[IvyConfiguration]("ivy-configuration", "General dependency management (Ivy) settings, such as the resolvers and paths to use.", DTask) val ivyConfigurations = SettingKey[Seq[Configuration]]("ivy-configurations", "The defined configurations for dependency management. This may be different from the configurations for Project settings.", BSetting) - // This setting was created to workaround the limitation of derived tasks not being able to use task-scoped task: ivyConfiguration in updateSbtClassifiers + // This setting was created to work around the limitation of derived tasks not being able to use task-scoped task: ivyConfiguration in updateSbtClassifiers val bootIvyConfiguration = TaskKey[IvyConfiguration]("boot-ivy-configuration", "General dependency management (Ivy) settings, configured to retrieve sbt's components.", DTask) val moduleSettings = TaskKey[ModuleSettings]("module-settings", "Module settings, which configure dependency management for a specific module, such as a project.", DTask) val unmanagedBase = SettingKey[File]("unmanaged-base", "The default directory for manually managed libraries.", ASetting) @@ -417,7 +417,7 @@ object Keys { val managedScalaInstance = SettingKey[Boolean]("managed-scala-instance", "Automatically obtains Scala tools as managed dependencies if true.", BSetting) val sbtResolver = SettingKey[Resolver]("sbt-resolver", "Provides a resolver for obtaining sbt as a dependency.", BMinusSetting) val sbtDependency = SettingKey[ModuleID]("sbt-dependency", "Provides a definition for declaring the current version of sbt.", BMinusSetting) - val sbtVersion = SettingKey[String]("sbt-version", "Provides the version of sbt. This setting should be not be modified.", AMinusSetting) + val sbtVersion = SettingKey[String]("sbt-version", "Provides the version of sbt. This setting should not be modified.", AMinusSetting) val sbtBinaryVersion = SettingKey[String]("sbt-binary-version", "Defines the binary compatibility version substring.", BPlusSetting) val skip = TaskKey[Boolean]("skip", "For tasks that support it (currently only 'compile' and 'update'), setting skip to true will force the task to not to do its work. This exact semantics may vary by task.", BSetting) val templateResolverInfos = SettingKey[Seq[TemplateResolverInfo]]("templateResolverInfos", "Template resolvers used for 'new'.", BSetting) diff --git a/main/src/main/scala/sbt/internal/BuildUtil.scala b/main/src/main/scala/sbt/internal/BuildUtil.scala index 3f9c9e847..624078311 100644 --- a/main/src/main/scala/sbt/internal/BuildUtil.scala +++ b/main/src/main/scala/sbt/internal/BuildUtil.scala @@ -73,7 +73,7 @@ object BuildUtil { } } - def baseImports: Seq[String] = "import scala.xml.{TopScope=>$scope}" :: "import sbt._, Keys._, syntax._" :: Nil + def baseImports: Seq[String] = "import _root_.scala.xml.{TopScope=>$scope}" :: "import _root_.sbt._" :: "import _root_.sbt.Keys._" :: Nil def getImports(unit: BuildUnit): Seq[String] = unit.plugins.detected.imports ++ unit.definitions.dslDefinitions.imports diff --git a/sbt/src/main/scala/AllSyntax.scala b/sbt/src/main/scala/AllSyntax.scala new file mode 100644 index 000000000..2eac995c2 --- /dev/null +++ b/sbt/src/main/scala/AllSyntax.scala @@ -0,0 +1,17 @@ +package sbt + +// Todo share this this io.syntax +private[sbt] trait IOSyntax0 extends IOSyntax1 { + implicit def alternative[A, B](f: A => Option[B]): Alternative[A, B] = + new Alternative[A, B] { + def |(g: A => Option[B]) = + (a: A) => f(a) orElse g(a) + } +} +private[sbt] trait Alternative[A, B] { + def |(g: A => Option[B]): A => Option[B] +} + +private[sbt] trait IOSyntax1 { + implicit def singleFileFinder(file: File): sbt.io.PathFinder = sbt.io.PathFinder(file) +} diff --git a/sbt/src/main/scala/package.scala b/sbt/src/main/scala/package.scala index 71288c370..976bcbae9 100644 --- a/sbt/src/main/scala/package.scala +++ b/sbt/src/main/scala/package.scala @@ -1,4 +1,48 @@ /* sbt -- Simple Build Tool * Copyright 2010, 2011 Mark Harrah */ -package object sbt extends Import +package object sbt extends sbt.IOSyntax0 + with sbt.std.TaskExtra + with sbt.internal.util.Types + with sbt.internal.librarymanagement.impl.DependencyBuilders + with sbt.ProjectExtra + with sbt.internal.librarymanagement.DependencyFilterExtra + with sbt.BuildExtra + with sbt.TaskMacroExtra + with sbt.ScopeFilter.Make + with sbt.BuildSyntax + with sbt.Import { + // IO + def uri(s: String): URI = new URI(s) + def file(s: String): File = new File(s) + def url(s: String): URL = new URL(s) + implicit def fileToRichFile(file: File): sbt.io.RichFile = new sbt.io.RichFile(file) + implicit def filesToFinder(cc: Traversable[File]): sbt.io.PathFinder = sbt.io.PathFinder.strict(cc) + + // others + + object CompileOrder { + val JavaThenScala = xsbti.compile.CompileOrder.JavaThenScala + val ScalaThenJava = xsbti.compile.CompileOrder.ScalaThenJava + val Mixed = xsbti.compile.CompileOrder.Mixed + } + type CompileOrder = xsbti.compile.CompileOrder + + implicit def maybeToOption[S](m: xsbti.Maybe[S]): Option[S] = + if (m.isDefined) Some(m.get) else None + + final val ThisScope = Scope.ThisScope + final val GlobalScope = Scope.GlobalScope + + import sbt.{ Configurations => C } + final val Compile = C.Compile + final val Test = C.Test + final val Runtime = C.Runtime + final val IntegrationTest = C.IntegrationTest + final val Default = C.Default + final val Provided = C.Provided + // java.lang.System is more important, so don't alias this one + // final val System = C.System + final val Optional = C.Optional + def config(s: String): Configuration = C.config(s) +} diff --git a/sbt/src/main/scala/syntax.scala b/sbt/src/main/scala/syntax.scala deleted file mode 100644 index 73e7e3ad0..000000000 --- a/sbt/src/main/scala/syntax.scala +++ /dev/null @@ -1,60 +0,0 @@ -package sbt - -object syntax extends syntax - -abstract class syntax extends IOSyntax0 with sbt.std.TaskExtra with sbt.internal.util.Types - with sbt.internal.librarymanagement.impl.DependencyBuilders with sbt.ProjectExtra - with sbt.internal.librarymanagement.DependencyFilterExtra with sbt.BuildExtra with sbt.TaskMacroExtra - with sbt.ScopeFilter.Make - with sbt.BuildSyntax { - - // IO - def uri(s: String): URI = new URI(s) - def file(s: String): File = new File(s) - def url(s: String): URL = new URL(s) - implicit def fileToRichFile(file: File): sbt.io.RichFile = new sbt.io.RichFile(file) - implicit def filesToFinder(cc: Traversable[File]): sbt.io.PathFinder = sbt.io.PathFinder.strict(cc) - - // others - - object CompileOrder { - val JavaThenScala = xsbti.compile.CompileOrder.JavaThenScala - val ScalaThenJava = xsbti.compile.CompileOrder.ScalaThenJava - val Mixed = xsbti.compile.CompileOrder.Mixed - } - type CompileOrder = xsbti.compile.CompileOrder - - implicit def maybeToOption[S](m: xsbti.Maybe[S]): Option[S] = - if (m.isDefined) Some(m.get) else None - - final val ThisScope = Scope.ThisScope - final val GlobalScope = Scope.GlobalScope - - import sbt.{ Configurations => C } - final val Compile = C.Compile - final val Test = C.Test - final val Runtime = C.Runtime - final val IntegrationTest = C.IntegrationTest - final val Default = C.Default - final val Provided = C.Provided - // java.lang.System is more important, so don't alias this one - // final val System = C.System - final val Optional = C.Optional - def config(s: String): Configuration = C.config(s) -} - -// Todo share this this io.syntax -private[sbt] trait IOSyntax0 extends IOSyntax1 { - implicit def alternative[A, B](f: A => Option[B]): Alternative[A, B] = - new Alternative[A, B] { - def |(g: A => Option[B]) = - (a: A) => f(a) orElse g(a) - } -} -private[sbt] trait Alternative[A, B] { - def |(g: A => Option[B]): A => Option[B] -} - -private[sbt] trait IOSyntax1 { - implicit def singleFileFinder(file: File): sbt.io.PathFinder = sbt.io.PathFinder(file) -} diff --git a/sbt/src/sbt-test/actions/aggregate/project/Marker.scala b/sbt/src/sbt-test/actions/aggregate/project/Marker.scala index fa10c0bc4..ad1697df4 100644 --- a/sbt/src/sbt-test/actions/aggregate/project/Marker.scala +++ b/sbt/src/sbt-test/actions/aggregate/project/Marker.scala @@ -1,4 +1,4 @@ -import sbt._, syntax._, Keys._ +import sbt._, Keys._ import Def.Initialize object Marker extends AutoPlugin { diff --git a/sbt/src/sbt-test/actions/compile-time-only/changes/A1.scala b/sbt/src/sbt-test/actions/compile-time-only/changes/A1.scala index d83a42865..0975dfda7 100644 --- a/sbt/src/sbt-test/actions/compile-time-only/changes/A1.scala +++ b/sbt/src/sbt-test/actions/compile-time-only/changes/A1.scala @@ -1,4 +1,4 @@ -import sbt._, syntax._, Keys._ +import sbt._, Keys._ import Def.Initialize import complete.{DefaultParsers, Parser} diff --git a/sbt/src/sbt-test/actions/compile-time-only/changes/A3.scala b/sbt/src/sbt-test/actions/compile-time-only/changes/A3.scala index 8a4a3a849..83a45ead8 100644 --- a/sbt/src/sbt-test/actions/compile-time-only/changes/A3.scala +++ b/sbt/src/sbt-test/actions/compile-time-only/changes/A3.scala @@ -1,4 +1,4 @@ -import sbt._, syntax._, Keys._ +import sbt._, Keys._ import Def.Initialize import complete.{DefaultParsers, Parser} diff --git a/sbt/src/sbt-test/actions/completions/project/FooPlugin.scala b/sbt/src/sbt-test/actions/completions/project/FooPlugin.scala index 092417875..4bef386d9 100644 --- a/sbt/src/sbt-test/actions/completions/project/FooPlugin.scala +++ b/sbt/src/sbt-test/actions/completions/project/FooPlugin.scala @@ -1,5 +1,4 @@ import sbt._ -import syntax._ object FooPlugin extends AutoPlugin { override def trigger = noTrigger diff --git a/sbt/src/sbt-test/actions/generator/build.sbt b/sbt/src/sbt-test/actions/generator/build.sbt new file mode 100644 index 000000000..c347b414e --- /dev/null +++ b/sbt/src/sbt-test/actions/generator/build.sbt @@ -0,0 +1,13 @@ +lazy val buildInfo = taskKey[Seq[File]]("The task that generates the build info.") + +lazy val root = (project in file(".")) + .settings( + scalaVersion := "2.11.8", + buildInfo := { + val x = sourceManaged.value / "BuildInfo.scala" + IO.write(x, """object BuildInfo""") + x :: Nil + }, + sourceGenerators in Compile += buildInfo, + sourceGenerators in Compile += Def.task { Nil } + ) diff --git a/sbt/src/sbt-test/actions/generator/test b/sbt/src/sbt-test/actions/generator/test new file mode 100644 index 000000000..385612f46 --- /dev/null +++ b/sbt/src/sbt-test/actions/generator/test @@ -0,0 +1,2 @@ +> compile +$ exists target/scala-2.11/src_managed/BuildInfo.scala diff --git a/sbt/src/sbt-test/compiler-project/semantic-errors/project/src/main/scala/sbt/TestPlugin.scala b/sbt/src/sbt-test/compiler-project/semantic-errors/project/src/main/scala/sbt/TestPlugin.scala index 4f3746d3e..53bed2c8a 100644 --- a/sbt/src/sbt-test/compiler-project/semantic-errors/project/src/main/scala/sbt/TestPlugin.scala +++ b/sbt/src/sbt-test/compiler-project/semantic-errors/project/src/main/scala/sbt/TestPlugin.scala @@ -1,6 +1,5 @@ package sbt -import sbt.syntax._ import sbt.Keys._ import xsbti.{Position, Severity} diff --git a/sbt/src/sbt-test/project/auto-import/project/P.scala b/sbt/src/sbt-test/project/auto-import/project/P.scala index 0ff8fbd51..70e309a38 100644 --- a/sbt/src/sbt-test/project/auto-import/project/P.scala +++ b/sbt/src/sbt-test/project/auto-import/project/P.scala @@ -1,4 +1,4 @@ -import sbt._, syntax._ +import sbt._ object Q extends AutoPlugin { override val requires = plugins.JvmPlugin diff --git a/sbt/src/sbt-test/project/auto-plugins-default-requires-jvmplugin/build.sbt b/sbt/src/sbt-test/project/auto-plugins-default-requires-jvmplugin/build.sbt index 601ed7611..bea5471fd 100644 --- a/sbt/src/sbt-test/project/auto-plugins-default-requires-jvmplugin/build.sbt +++ b/sbt/src/sbt-test/project/auto-plugins-default-requires-jvmplugin/build.sbt @@ -1,8 +1,8 @@ val test123 = project in file(".") enablePlugins TestP settings( - resourceGenerators in Compile += (Def.task { + resourceGenerators in Compile += Def.task { streams.value.log info "resource generated in settings" Nil - }).taskValue + } ) TaskKey[Unit]("check") := { diff --git a/sbt/src/sbt-test/project/auto-plugins-default-requires-jvmplugin/project/TestP.scala b/sbt/src/sbt-test/project/auto-plugins-default-requires-jvmplugin/project/TestP.scala index ce7b6f707..c52417af9 100644 --- a/sbt/src/sbt-test/project/auto-plugins-default-requires-jvmplugin/project/TestP.scala +++ b/sbt/src/sbt-test/project/auto-plugins-default-requires-jvmplugin/project/TestP.scala @@ -1,10 +1,10 @@ -import sbt._, syntax._, Keys._ +import sbt._, Keys._ object TestP extends AutoPlugin { override def projectSettings: Seq[Setting[_]] = Seq( - resourceGenerators in Compile += (Def.task { + resourceGenerators in Compile += Def.task { streams.value.log info "resource generated in plugin" Nil - }).taskValue + } ) } diff --git a/sbt/src/sbt-test/project/auto-plugins-nested/project/Q.scala b/sbt/src/sbt-test/project/auto-plugins-nested/project/Q.scala index 19af35308..b7deb8b58 100644 --- a/sbt/src/sbt-test/project/auto-plugins-nested/project/Q.scala +++ b/sbt/src/sbt-test/project/auto-plugins-nested/project/Q.scala @@ -1,5 +1,5 @@ package sbttest -import sbt._, syntax._, Keys._ +import sbt._, Keys._ object Imports { object A extends AutoPlugin diff --git a/sbt/src/sbt-test/project/auto-plugins/project/A.scala b/sbt/src/sbt-test/project/auto-plugins/project/A.scala index 7871676de..b11319afe 100644 --- a/sbt/src/sbt-test/project/auto-plugins/project/A.scala +++ b/sbt/src/sbt-test/project/auto-plugins/project/A.scala @@ -1,7 +1,7 @@ // no package // plugins declared within no package should be visible to other plugins in the _root_ package -import sbt._, syntax._, Keys._ +import sbt._, Keys._ object TopLevelImports { lazy val topLevelDemo = settingKey[String]("A top level demo setting.") diff --git a/sbt/src/sbt-test/project/auto-plugins/project/Q.scala b/sbt/src/sbt-test/project/auto-plugins/project/Q.scala index 091e812d6..05c877b5d 100644 --- a/sbt/src/sbt-test/project/auto-plugins/project/Q.scala +++ b/sbt/src/sbt-test/project/auto-plugins/project/Q.scala @@ -1,6 +1,6 @@ package sbttest // you need package http://stackoverflow.com/questions/9822008/ - import sbt._, syntax._, Keys._ + import sbt._, Keys._ import java.util.concurrent.atomic.{AtomicInteger => AInt} object A extends AutoPlugin { override def requires: Plugins = empty } diff --git a/sbt/src/sbt-test/project/binary-plugin/changes/define/A.scala b/sbt/src/sbt-test/project/binary-plugin/changes/define/A.scala index f003b8da5..2966e091c 100644 --- a/sbt/src/sbt-test/project/binary-plugin/changes/define/A.scala +++ b/sbt/src/sbt-test/project/binary-plugin/changes/define/A.scala @@ -1,6 +1,6 @@ package sbttest // you need package http://stackoverflow.com/questions/9822008/ -import sbt._, syntax._, Keys._ +import sbt._, Keys._ object C extends AutoPlugin { object autoImport { diff --git a/sbt/src/sbt-test/project/binary-plugin/changes/define/D.scala b/sbt/src/sbt-test/project/binary-plugin/changes/define/D.scala index 1b21ad9dd..7490579a8 100644 --- a/sbt/src/sbt-test/project/binary-plugin/changes/define/D.scala +++ b/sbt/src/sbt-test/project/binary-plugin/changes/define/D.scala @@ -1,6 +1,6 @@ // no package declaration -import sbt._, syntax._, Keys._ +import sbt._, Keys._ object D extends AutoPlugin { object autoImport { diff --git a/sbt/src/sbt-test/project/extra-projects/project/DatabasePlugin.scala b/sbt/src/sbt-test/project/extra-projects/project/DatabasePlugin.scala index 0febc622b..0d7a4163e 100644 --- a/sbt/src/sbt-test/project/extra-projects/project/DatabasePlugin.scala +++ b/sbt/src/sbt-test/project/extra-projects/project/DatabasePlugin.scala @@ -1,4 +1,4 @@ -import sbt._, syntax._, Keys._ +import sbt._, Keys._ object DatabasePlugin extends AutoPlugin { override def requires: Plugins = sbt.plugins.JvmPlugin diff --git a/sbt/src/sbt-test/project/extra-projects/project/ExtraProjectPluginExample.scala b/sbt/src/sbt-test/project/extra-projects/project/ExtraProjectPluginExample.scala index 1ebb3d494..0ab386369 100644 --- a/sbt/src/sbt-test/project/extra-projects/project/ExtraProjectPluginExample.scala +++ b/sbt/src/sbt-test/project/extra-projects/project/ExtraProjectPluginExample.scala @@ -1,4 +1,4 @@ -import sbt._, syntax._, Keys._ +import sbt._, Keys._ object ExtraProjectPluginExample extends AutoPlugin { override def extraProjects: Seq[Project] = diff --git a/sbt/src/sbt-test/project/extra-projects/project/ExtraProjectPluginExample2.scala b/sbt/src/sbt-test/project/extra-projects/project/ExtraProjectPluginExample2.scala index e74064a4a..dd1682623 100644 --- a/sbt/src/sbt-test/project/extra-projects/project/ExtraProjectPluginExample2.scala +++ b/sbt/src/sbt-test/project/extra-projects/project/ExtraProjectPluginExample2.scala @@ -1,4 +1,4 @@ -import sbt._, syntax._, Keys._ +import sbt._, Keys._ object ExtraProjectPluginExample2 extends AutoPlugin { // Enable this plugin by default diff --git a/sbt/src/sbt-test/project/global-plugin/global/plugins/A.scala b/sbt/src/sbt-test/project/global-plugin/global/plugins/A.scala index d22df4753..0ac7f6e66 100644 --- a/sbt/src/sbt-test/project/global-plugin/global/plugins/A.scala +++ b/sbt/src/sbt-test/project/global-plugin/global/plugins/A.scala @@ -1,6 +1,6 @@ package test -import sbt._, syntax._, Keys._ +import sbt._, Keys._ object Global { val x = 3 diff --git a/sbt/src/sbt-test/project/isolated-build-definitions/generator/build.sbt b/sbt/src/sbt-test/project/isolated-build-definitions/generator/build.sbt index 4b1c3536a..cbc8c6c17 100644 --- a/sbt/src/sbt-test/project/isolated-build-definitions/generator/build.sbt +++ b/sbt/src/sbt-test/project/isolated-build-definitions/generator/build.sbt @@ -1,4 +1,4 @@ -lazy val project = (sbt.syntax.project in file(".")). +lazy val project = (sbt.project in file(".")). settings( name := "project", scalaVersion := "2.11.7", diff --git a/sbt/src/sbt-test/project/session-update-from-cmd/project/Common.scala b/sbt/src/sbt-test/project/session-update-from-cmd/project/Common.scala index b744f5c1f..f977fa81a 100644 --- a/sbt/src/sbt-test/project/session-update-from-cmd/project/Common.scala +++ b/sbt/src/sbt-test/project/session-update-from-cmd/project/Common.scala @@ -1,4 +1,4 @@ -import sbt._, syntax._, Keys._ +import sbt._, Keys._ import sbt.internal.SessionSettings diff --git a/scripted/plugin/src/main/scala/sbt/ScriptedPlugin.scala b/scripted/plugin/src/main/scala/sbt/ScriptedPlugin.scala index 546ad73b7..e865b504d 100644 --- a/scripted/plugin/src/main/scala/sbt/ScriptedPlugin.scala +++ b/scripted/plugin/src/main/scala/sbt/ScriptedPlugin.scala @@ -10,8 +10,6 @@ import sbt.internal.inc.classpath.ClasspathUtilities import sbt.internal.inc.ModuleUtilities import java.lang.reflect.Method -import sbt.syntax._ - object ScriptedPlugin extends AutoPlugin { override def requires = plugins.JvmPlugin override def trigger = allRequirements