mirror of https://github.com/sbt/sbt.git
Copy the non-runtime parts of project/unified to SlashSyntaxTest
This commit is contained in:
parent
f22843f91c
commit
97ddc1ffb7
|
|
@ -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,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -43,16 +43,6 @@ package object sbt
|
||||||
final val Global = Scope.Global
|
final val Global = Scope.Global
|
||||||
final val GlobalScope = Scope.GlobalScope
|
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 =
|
def config(name: String): Configuration =
|
||||||
macro sbt.librarymanagement.ConfigurationMacro.configMacroImpl
|
macro sbt.librarymanagement.ConfigurationMacro.configMacroImpl
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import Dependencies._
|
|
||||||
import sbt.internal.CommandStrings.{ inspectBrief, inspectDetailed }
|
import sbt.internal.CommandStrings.{ inspectBrief, inspectDetailed }
|
||||||
import sbt.internal.Inspect
|
import sbt.internal.Inspect
|
||||||
|
|
||||||
|
val uTest = "com.lihaoyi" %% "utest" % "0.5.3"
|
||||||
|
|
||||||
lazy val root = (project in file("."))
|
lazy val root = (project in file("."))
|
||||||
.settings(
|
.settings(
|
||||||
Global / cancelable := true,
|
Global / cancelable := true,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
import sbt._
|
|
||||||
|
|
||||||
object Dependencies {
|
|
||||||
val uTest = "com.lihaoyi" %% "utest" % "0.5.3"
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue