Copy the non-runtime parts of project/unified to SlashSyntaxTest

This commit is contained in:
Dale Wijnand 2017-10-05 10:08:13 +01:00
parent f22843f91c
commit 97ddc1ffb7
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
4 changed files with 43 additions and 16 deletions

View File

@ -0,0 +1,41 @@
/*
* sbt
* Copyright 2011 - 2017, Lightbend, Inc.
* Copyright 2008 - 2010, Mark Harrah
* Licensed under BSD-3-Clause license (see LICENSE)
*/
package sbt.test
import sbt.Def.{ Setting, settingKey, taskKey }
import sbt.Scope.Global
import sbt.librarymanagement.ModuleID
import sbt.librarymanagement.syntax._
import sbt.{ LocalProject, ProjectReference, ThisBuild, Zero }
object SlashSyntaxTest extends sbt.SlashSyntax {
final case class Proj(id: String)
implicit def projToRef(p: Proj): ProjectReference = LocalProject(p.id)
val projA = Proj("a")
val cancelable = settingKey[Boolean]("")
val console = taskKey[Unit]("")
val libraryDependencies = settingKey[Seq[ModuleID]]("")
val name = settingKey[String]("")
val scalaVersion = settingKey[String]("")
val scalacOptions = taskKey[Seq[String]]("")
val uTest = "com.lihaoyi" %% "utest" % "0.5.3"
Seq[Setting[_]](
Global / cancelable := true,
ThisBuild / scalaVersion := "2.12.3",
console / scalacOptions += "-deprecation",
Compile / console / scalacOptions += "-Ywarn-numeric-widen",
projA / Compile / console / scalacOptions += "-feature",
Zero / Zero / name := "foo",
Zero / Zero / Zero / name := "foo",
libraryDependencies += uTest % Test,
)
}

View File

@ -43,16 +43,6 @@ package object sbt
final val Global = Scope.Global
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(name: String): Configuration =
macro sbt.librarymanagement.ConfigurationMacro.configMacroImpl
}

View File

@ -1,7 +1,8 @@
import Dependencies._
import sbt.internal.CommandStrings.{ inspectBrief, inspectDetailed }
import sbt.internal.Inspect
val uTest = "com.lihaoyi" %% "utest" % "0.5.3"
lazy val root = (project in file("."))
.settings(
Global / cancelable := true,

View File

@ -1,5 +0,0 @@
import sbt._
object Dependencies {
val uTest = "com.lihaoyi" %% "utest" % "0.5.3"
}