mirror of https://github.com/sbt/sbt.git
Switch to sbt 1.0.4
This commit is contained in:
parent
9df9c617be
commit
6f37e95be6
22
build.sbt
22
build.sbt
|
|
@ -6,6 +6,7 @@ import Publish._
|
|||
parallelExecution.in(Global) := false
|
||||
|
||||
lazy val core = crossProject
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.jvmConfigure(_.enablePlugins(ShadingPlugin))
|
||||
.jvmSettings(
|
||||
shading,
|
||||
|
|
@ -40,6 +41,7 @@ lazy val coreJvm = core.jvm
|
|||
lazy val coreJs = core.js
|
||||
|
||||
lazy val `fetch-js` = project
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.enablePlugins(ScalaJSPlugin)
|
||||
.dependsOn(coreJs)
|
||||
.settings(
|
||||
|
|
@ -49,6 +51,7 @@ lazy val `fetch-js` = project
|
|||
)
|
||||
|
||||
lazy val tests = crossProject
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.dependsOn(core)
|
||||
.jvmConfigure(_.dependsOn(cache % "test"))
|
||||
.jsConfigure(_.dependsOn(`fetch-js` % "test"))
|
||||
|
|
@ -70,6 +73,7 @@ lazy val testsJvm = tests.jvm
|
|||
lazy val testsJs = tests.js
|
||||
|
||||
lazy val `proxy-tests` = project
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.dependsOn(testsJvm % "test->test")
|
||||
.configs(Integration)
|
||||
.settings(
|
||||
|
|
@ -83,6 +87,7 @@ lazy val `proxy-tests` = project
|
|||
)
|
||||
|
||||
lazy val paths = project
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.settings(
|
||||
pureJava,
|
||||
dontPublish,
|
||||
|
|
@ -90,6 +95,7 @@ lazy val paths = project
|
|||
)
|
||||
|
||||
lazy val cache = project
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.dependsOn(coreJvm)
|
||||
.settings(
|
||||
shared,
|
||||
|
|
@ -101,6 +107,7 @@ lazy val cache = project
|
|||
)
|
||||
|
||||
lazy val bootstrap = project
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.settings(
|
||||
pureJava,
|
||||
dontPublish,
|
||||
|
|
@ -111,6 +118,7 @@ lazy val bootstrap = project
|
|||
)
|
||||
|
||||
lazy val extra = project
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.enablePlugins(ShadingPlugin)
|
||||
.dependsOn(coreJvm)
|
||||
.settings(
|
||||
|
|
@ -144,6 +152,7 @@ lazy val extra = project
|
|||
|
||||
lazy val cli = project
|
||||
.dependsOn(coreJvm, cache, extra)
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.enablePlugins(PackPlugin, SbtProguard)
|
||||
.settings(
|
||||
shared,
|
||||
|
|
@ -165,6 +174,7 @@ lazy val cli = project
|
|||
)
|
||||
|
||||
lazy val web = project
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.enablePlugins(ScalaJSPlugin)
|
||||
.dependsOn(coreJs, `fetch-js`)
|
||||
.settings(
|
||||
|
|
@ -211,6 +221,7 @@ lazy val web = project
|
|||
|
||||
lazy val doc = project
|
||||
.dependsOn(coreJvm, cache)
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.enablePlugins(TutPlugin)
|
||||
.settings(
|
||||
shared,
|
||||
|
|
@ -221,6 +232,7 @@ lazy val doc = project
|
|||
|
||||
lazy val `sbt-shared` = project
|
||||
.dependsOn(coreJvm, cache)
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.settings(
|
||||
plugin,
|
||||
utest
|
||||
|
|
@ -228,6 +240,7 @@ lazy val `sbt-shared` = project
|
|||
|
||||
lazy val `sbt-coursier` = project
|
||||
.dependsOn(coreJvm, cache, extra, `sbt-shared`)
|
||||
.enablePlugins(ScriptedPlugin)
|
||||
.settings(
|
||||
plugin,
|
||||
utest
|
||||
|
|
@ -235,6 +248,7 @@ lazy val `sbt-coursier` = project
|
|||
|
||||
lazy val `sbt-pgp-coursier` = project
|
||||
.dependsOn(`sbt-coursier`)
|
||||
.enablePlugins(ScriptedPlugin)
|
||||
.settings(
|
||||
plugin,
|
||||
libs ++= {
|
||||
|
|
@ -247,7 +261,7 @@ lazy val `sbt-pgp-coursier` = project
|
|||
)
|
||||
|
||||
lazy val `sbt-shading` = project
|
||||
.enablePlugins(ShadingPlugin)
|
||||
.enablePlugins(ScriptedPlugin, ShadingPlugin)
|
||||
.dependsOn(`sbt-coursier`)
|
||||
.settings(
|
||||
plugin,
|
||||
|
|
@ -260,6 +274,7 @@ lazy val `sbt-shading` = project
|
|||
|
||||
lazy val `sbt-launcher` = project
|
||||
.enablePlugins(PackPlugin)
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.dependsOn(cache)
|
||||
.settings(
|
||||
shared,
|
||||
|
|
@ -278,6 +293,7 @@ lazy val `sbt-launcher` = project
|
|||
|
||||
lazy val okhttp = project
|
||||
.dependsOn(cache)
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.settings(
|
||||
shared,
|
||||
coursierPrefix,
|
||||
|
|
@ -286,6 +302,7 @@ lazy val okhttp = project
|
|||
|
||||
lazy val jvm = project
|
||||
.dummy
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.aggregate(
|
||||
coreJvm,
|
||||
testsJvm,
|
||||
|
|
@ -311,6 +328,7 @@ lazy val jvm = project
|
|||
|
||||
lazy val js = project
|
||||
.dummy
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.aggregate(
|
||||
coreJs,
|
||||
`fetch-js`,
|
||||
|
|
@ -326,6 +344,7 @@ lazy val js = project
|
|||
// run sbt-plugins/publishLocal to publish all that necessary for plugins
|
||||
lazy val `sbt-plugins` = project
|
||||
.dummy
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.aggregate(
|
||||
coreJvm,
|
||||
cache,
|
||||
|
|
@ -342,6 +361,7 @@ lazy val `sbt-plugins` = project
|
|||
|
||||
lazy val coursier = project
|
||||
.in(root)
|
||||
.disablePlugins(ScriptedPlugin)
|
||||
.aggregate(
|
||||
coreJvm,
|
||||
coreJs,
|
||||
|
|
|
|||
|
|
@ -2,31 +2,11 @@
|
|||
import sbt._
|
||||
import sbt.Defaults.itSettings
|
||||
import sbt.Keys._
|
||||
import sbt.ScriptedPlugin.{scriptedConf, scriptedLaunchConf, scriptedSbt, scriptedSettings}
|
||||
|
||||
object Aliases {
|
||||
|
||||
def libs = libraryDependencies
|
||||
|
||||
def withScriptedTests =
|
||||
// see https://github.com/sbt/sbt/issues/3325#issuecomment-315670424
|
||||
scriptedSettings.filterNot(_.key.key.label == libraryDependencies.key.label) ++ Seq(
|
||||
libraryDependencies ++= {
|
||||
CrossVersion.binarySbtVersion(scriptedSbt.value) match {
|
||||
case "0.13" =>
|
||||
Seq(
|
||||
"org.scala-sbt" % "scripted-sbt" % scriptedSbt.value % scriptedConf.toString,
|
||||
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % scriptedLaunchConf.toString
|
||||
)
|
||||
case _ =>
|
||||
Seq(
|
||||
"org.scala-sbt" %% "scripted-sbt" % scriptedSbt.value % scriptedConf.toString,
|
||||
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % scriptedLaunchConf.toString
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
def hasITs = itSettings
|
||||
|
||||
def ShadingPlugin = coursier.ShadingPlugin
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ object Deps {
|
|||
def junit = "junit" % "junit" % "4.12"
|
||||
|
||||
def sbtPgp = Def.setting {
|
||||
val sbtv = CrossVersion.binarySbtVersion(sbtVersion.value)
|
||||
val sbtv = CrossVersion.binarySbtVersion(sbtVersion.in(pluginCrossBuild).value)
|
||||
val sv = scalaBinaryVersion.value
|
||||
val ver = "1.1.0"
|
||||
sbtPluginExtra("com.jsuereth" % "sbt-pgp" % ver, sbtv, sv)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import java.nio.file.{Files, Paths}
|
|||
import java.util.regex.Pattern
|
||||
|
||||
import com.typesafe.sbt.pgp.PgpKeys
|
||||
import sbt.{ProcessLogger => _, _}
|
||||
import sbt._
|
||||
import sbt.Keys._
|
||||
import sbt.Package.ManifestAttributes
|
||||
import sbtrelease.ReleasePlugin.autoImport._
|
||||
|
|
@ -157,7 +157,7 @@ object Release {
|
|||
|
||||
val tag = scala.sys.process.Process(cmd)
|
||||
.!!
|
||||
.linesIterator
|
||||
.lines
|
||||
.toVector
|
||||
.lastOption
|
||||
.getOrElse {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
import sbt._
|
||||
import sbt.Keys._
|
||||
import sbt.ScriptedPlugin._
|
||||
import sbt.ScriptedPlugin.autoImport.{sbtLauncher, scriptedBufferLog, ScriptedLaunchConf, scriptedLaunchOpts}
|
||||
|
||||
import com.lightbend.sbt.SbtProguard.autoImport._
|
||||
import com.typesafe.sbt.pgp._
|
||||
|
|
@ -27,6 +27,7 @@ object Settings {
|
|||
organization := "io.get-coursier",
|
||||
scalazBintrayRepository,
|
||||
sonatypeRepository("releases"),
|
||||
crossScalaVersions := Seq("2.12.1", "2.11.11", "2.10.6"), // defined for all projects to trump sbt-doge
|
||||
scalacOptions ++= {
|
||||
val targetJvm = scalaBinaryVersion.value match {
|
||||
case "2.10" | "2.11" =>
|
||||
|
|
@ -53,7 +54,6 @@ object Settings {
|
|||
|
||||
lazy val shared = javaScalaPluginShared ++ Seq(
|
||||
scalaVersion := "2.12.1",
|
||||
crossScalaVersions := Seq("2.12.1", "2.11.11", "2.10.6"),
|
||||
libs ++= {
|
||||
if (scalaBinaryVersion.value == "2.10")
|
||||
Seq(compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full))
|
||||
|
|
@ -191,7 +191,6 @@ object Settings {
|
|||
lazy val plugin =
|
||||
javaScalaPluginShared ++
|
||||
divertThingsPlugin ++
|
||||
withScriptedTests ++
|
||||
Seq(
|
||||
scriptedLaunchOpts ++= Seq(
|
||||
"-Xmx1024M",
|
||||
|
|
@ -205,12 +204,11 @@ object Settings {
|
|||
case _ => false
|
||||
}
|
||||
},
|
||||
scalaVersion := appConfiguration.value.provider.scalaProvider.version, // required with sbt 0.13.16-M1, to avoid cyclic references
|
||||
sbtVersion := {
|
||||
sbtVersion.in(pluginCrossBuild) := {
|
||||
scalaBinaryVersion.value match {
|
||||
case "2.10" => sbt013Version
|
||||
case "2.12" => sbt10Version
|
||||
case _ => sbtVersion.value
|
||||
case _ => sbtVersion.in(pluginCrossBuild).value
|
||||
}
|
||||
},
|
||||
resolvers ++= Seq(
|
||||
|
|
@ -266,12 +264,7 @@ object Settings {
|
|||
Def.task(Map())
|
||||
}
|
||||
|
||||
packagedArtifacts ++= {
|
||||
if (scalaBinaryVersion.value == "2.11")
|
||||
extra.value
|
||||
else
|
||||
Map()
|
||||
}
|
||||
packagedArtifacts ++= extra.value
|
||||
}
|
||||
|
||||
lazy val Integration = config("it").extend(Test)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
sbt.version=0.13.16
|
||||
sbt.version=1.0.4
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ plugins_(
|
|||
"io.get-coursier" % "sbt-shading" % coursierVersion,
|
||||
"org.xerial.sbt" % "sbt-sonatype" % "2.0",
|
||||
"com.timushev.sbt" % "sbt-updates" % "0.3.3",
|
||||
"org.tpolecat" % "tut-plugin" % "0.5.5"
|
||||
"org.tpolecat" % "tut-plugin" % "0.6.1"
|
||||
)
|
||||
|
||||
libs ++= Seq(
|
||||
"org.scala-sbt" % "scripted-plugin" % sbtVersion.value,
|
||||
"org.scala-sbt" %% "scripted-plugin" % sbtVersion.value,
|
||||
compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full), // for shapeless / auto type class derivations
|
||||
"com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M5"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue