mirror of https://github.com/sbt/sbt.git
Prepare build.sbt for 2.12, keep updating dependencies
This commit is contained in:
parent
f59a6c44c3
commit
4b14215c33
|
|
@ -12,6 +12,9 @@ script:
|
||||||
# - bash <(curl -s https://codecov.io/bash)
|
# - bash <(curl -s https://codecov.io/bash)
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- env: TRAVIS_SCALA_VERSION=2.12.0-RC2 PUBLISH=1
|
||||||
|
os: linux
|
||||||
|
jdk: oraclejdk8
|
||||||
- env: TRAVIS_SCALA_VERSION=2.11.8 PUBLISH=1
|
- env: TRAVIS_SCALA_VERSION=2.11.8 PUBLISH=1
|
||||||
os: linux
|
os: linux
|
||||||
jdk: oraclejdk8
|
jdk: oraclejdk8
|
||||||
|
|
|
||||||
92
build.sbt
92
build.sbt
|
|
@ -47,21 +47,21 @@ lazy val noPublishSettings = Seq(
|
||||||
publishArtifact := false
|
publishArtifact := false
|
||||||
)
|
)
|
||||||
|
|
||||||
def noPublishForScalaVersionSettings(sbv: String) = Seq(
|
def noPublishForScalaVersionSettings(sbv: String*) = Seq(
|
||||||
publish := {
|
publish := {
|
||||||
if (scalaBinaryVersion.value == sbv)
|
if (sbv.contains(scalaBinaryVersion.value))
|
||||||
()
|
()
|
||||||
else
|
else
|
||||||
publish.value
|
publish.value
|
||||||
},
|
},
|
||||||
publishLocal := {
|
publishLocal := {
|
||||||
if (scalaBinaryVersion.value == sbv)
|
if (sbv.contains(scalaBinaryVersion.value))
|
||||||
()
|
()
|
||||||
else
|
else
|
||||||
publishLocal.value
|
publishLocal.value
|
||||||
},
|
},
|
||||||
publishArtifact := {
|
publishArtifact := {
|
||||||
if (scalaBinaryVersion.value == sbv)
|
if (sbv.contains(scalaBinaryVersion.value))
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
publishArtifact.value
|
publishArtifact.value
|
||||||
|
|
@ -88,7 +88,7 @@ lazy val commonSettings = scalaVersionAgnosticCommonSettings ++ Seq(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
val scalazVersion = "7.2.5"
|
val scalazVersion = "7.2.6"
|
||||||
|
|
||||||
lazy val core = crossProject
|
lazy val core = crossProject
|
||||||
.settings(commonSettings: _*)
|
.settings(commonSettings: _*)
|
||||||
|
|
@ -97,7 +97,7 @@ lazy val core = crossProject
|
||||||
name := "coursier",
|
name := "coursier",
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"org.scalaz" %%% "scalaz-core" % scalazVersion,
|
"org.scalaz" %%% "scalaz-core" % scalazVersion,
|
||||||
"com.lihaoyi" %%% "fastparse" % "0.4.1"
|
"com.lihaoyi" %%% "fastparse" % "0.4.2"
|
||||||
),
|
),
|
||||||
resourceGenerators.in(Compile) += {
|
resourceGenerators.in(Compile) += {
|
||||||
(target, version).map { (dir, ver) =>
|
(target, version).map { (dir, ver) =>
|
||||||
|
|
@ -229,10 +229,16 @@ lazy val tests = crossProject
|
||||||
.settings(Defaults.itSettings: _*)
|
.settings(Defaults.itSettings: _*)
|
||||||
.settings(
|
.settings(
|
||||||
name := "coursier-tests",
|
name := "coursier-tests",
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies += {
|
||||||
"org.scala-lang.modules" %% "scala-async" % "0.9.5" % "provided",
|
val asyncVersion =
|
||||||
"com.lihaoyi" %%% "utest" % "0.4.4" % "test"
|
if (scalaBinaryVersion.value == "2.10")
|
||||||
),
|
"0.9.5"
|
||||||
|
else
|
||||||
|
"0.9.6-RC6"
|
||||||
|
|
||||||
|
"org.scala-lang.modules" %% "scala-async" % asyncVersion % "provided"
|
||||||
|
},
|
||||||
|
libraryDependencies += "com.lihaoyi" %%% "utest" % "0.4.4" % "test",
|
||||||
unmanagedResourceDirectories in Test += (baseDirectory in LocalRootProject).value / "tests" / "shared" / "src" / "test" / "resources",
|
unmanagedResourceDirectories in Test += (baseDirectory in LocalRootProject).value / "tests" / "shared" / "src" / "test" / "resources",
|
||||||
testFrameworks += new TestFramework("utest.runner.Framework")
|
testFrameworks += new TestFramework("utest.runner.Framework")
|
||||||
)
|
)
|
||||||
|
|
@ -329,16 +335,16 @@ lazy val bootstrap = project
|
||||||
lazy val cli = project
|
lazy val cli = project
|
||||||
.dependsOn(coreJvm, cache)
|
.dependsOn(coreJvm, cache)
|
||||||
.settings(commonSettings)
|
.settings(commonSettings)
|
||||||
.settings(noPublishForScalaVersionSettings("2.10"))
|
.settings(noPublishForScalaVersionSettings("2.10", "2.12"))
|
||||||
.settings(packAutoSettings)
|
.settings(packAutoSettings)
|
||||||
.settings(proguardSettings)
|
.settings(proguardSettings)
|
||||||
.settings(
|
.settings(
|
||||||
name := "coursier-cli",
|
name := "coursier-cli",
|
||||||
libraryDependencies ++= {
|
libraryDependencies ++= {
|
||||||
if (scalaBinaryVersion.value == "2.10")
|
if (scalaBinaryVersion.value == "2.11")
|
||||||
Seq()
|
|
||||||
else
|
|
||||||
Seq("com.github.alexarchambault" %% "case-app" % "1.1.2")
|
Seq("com.github.alexarchambault" %% "case-app" % "1.1.2")
|
||||||
|
else
|
||||||
|
Seq()
|
||||||
},
|
},
|
||||||
resourceGenerators in Compile += packageBin.in(bootstrap).in(Compile).map { jar =>
|
resourceGenerators in Compile += packageBin.in(bootstrap).in(Compile).map { jar =>
|
||||||
Seq(jar)
|
Seq(jar)
|
||||||
|
|
@ -352,16 +358,17 @@ lazy val cli = project
|
||||||
javaOptions in (Proguard, ProguardKeys.proguard) := Seq("-Xmx3172M"),
|
javaOptions in (Proguard, ProguardKeys.proguard) := Seq("-Xmx3172M"),
|
||||||
artifactPath in Proguard := (ProguardKeys.proguardDirectory in Proguard).value / "coursier-standalone.jar",
|
artifactPath in Proguard := (ProguardKeys.proguardDirectory in Proguard).value / "coursier-standalone.jar",
|
||||||
artifacts ++= {
|
artifacts ++= {
|
||||||
if (scalaBinaryVersion.value == "2.10")
|
if (scalaBinaryVersion.value == "2.11")
|
||||||
Nil
|
Seq(
|
||||||
else Seq(
|
Artifact(
|
||||||
Artifact(
|
moduleName.value,
|
||||||
moduleName.value,
|
"jar",
|
||||||
"jar",
|
"jar",
|
||||||
"jar",
|
"standalone"
|
||||||
"standalone"
|
)
|
||||||
)
|
)
|
||||||
)
|
else
|
||||||
|
Nil
|
||||||
},
|
},
|
||||||
packagedArtifacts <++= {
|
packagedArtifacts <++= {
|
||||||
(
|
(
|
||||||
|
|
@ -371,9 +378,7 @@ lazy val cli = project
|
||||||
packageBin.in(bootstrap) in Compile
|
packageBin.in(bootstrap) in Compile
|
||||||
).map {
|
).map {
|
||||||
(mod, sbv, files, bootstrapJar) =>
|
(mod, sbv, files, bootstrapJar) =>
|
||||||
if (sbv == "2.10")
|
if (sbv == "2.11") {
|
||||||
Map.empty[Artifact, File]
|
|
||||||
else {
|
|
||||||
import java.util.zip.{ ZipEntry, ZipOutputStream, ZipInputStream }
|
import java.util.zip.{ ZipEntry, ZipOutputStream, ZipInputStream }
|
||||||
import java.io.{ ByteArrayOutputStream, FileInputStream, FileOutputStream, File, InputStream, IOException }
|
import java.io.{ ByteArrayOutputStream, FileInputStream, FileOutputStream, File, InputStream, IOException }
|
||||||
|
|
||||||
|
|
@ -450,7 +455,8 @@ lazy val cli = project
|
||||||
"standalone"
|
"standalone"
|
||||||
) -> f
|
) -> f
|
||||||
)
|
)
|
||||||
}
|
} else
|
||||||
|
Map.empty[Artifact, File]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -462,18 +468,18 @@ lazy val web = project
|
||||||
.settings(noPublishSettings)
|
.settings(noPublishSettings)
|
||||||
.settings(
|
.settings(
|
||||||
libraryDependencies ++= {
|
libraryDependencies ++= {
|
||||||
if (scalaBinaryVersion.value == "2.10")
|
if (scalaBinaryVersion.value == "2.11")
|
||||||
Seq()
|
|
||||||
else
|
|
||||||
Seq("com.github.japgolly.scalajs-react" %%% "core" % "0.9.0")
|
Seq("com.github.japgolly.scalajs-react" %%% "core" % "0.9.0")
|
||||||
|
else
|
||||||
|
Seq()
|
||||||
},
|
},
|
||||||
sourceDirectory := {
|
sourceDirectory := {
|
||||||
val dir = sourceDirectory.value
|
val dir = sourceDirectory.value
|
||||||
|
|
||||||
if (scalaBinaryVersion.value == "2.10")
|
if (scalaBinaryVersion.value == "2.11")
|
||||||
dir / "dummy"
|
|
||||||
else
|
|
||||||
dir
|
dir
|
||||||
|
else
|
||||||
|
dir / "dummy"
|
||||||
},
|
},
|
||||||
test in Test := (),
|
test in Test := (),
|
||||||
testOnly in Test := (),
|
testOnly in Test := (),
|
||||||
|
|
@ -500,7 +506,7 @@ lazy val doc = project
|
||||||
lazy val plugin = project
|
lazy val plugin = project
|
||||||
.dependsOn(coreJvm, cache)
|
.dependsOn(coreJvm, cache)
|
||||||
.settings(scalaVersionAgnosticCommonSettings)
|
.settings(scalaVersionAgnosticCommonSettings)
|
||||||
.settings(noPublishForScalaVersionSettings("2.11"))
|
.settings(noPublishForScalaVersionSettings("2.11", "2.12"))
|
||||||
.settings(
|
.settings(
|
||||||
name := "sbt-coursier",
|
name := "sbt-coursier",
|
||||||
sbtPlugin := (scalaBinaryVersion.value == "2.10"),
|
sbtPlugin := (scalaBinaryVersion.value == "2.10"),
|
||||||
|
|
@ -528,14 +534,20 @@ val http4sVersion = "0.8.6"
|
||||||
lazy val `http-server` = project
|
lazy val `http-server` = project
|
||||||
.settings(commonSettings)
|
.settings(commonSettings)
|
||||||
.settings(packAutoSettings)
|
.settings(packAutoSettings)
|
||||||
|
.settings(noPublishForScalaVersionSettings("2.10", "2.12"))
|
||||||
.settings(
|
.settings(
|
||||||
name := "http-server-java7",
|
name := "http-server-java7",
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= {
|
||||||
"org.http4s" %% "http4s-blazeserver" % http4sVersion,
|
if (scalaBinaryVersion.value == "2.11")
|
||||||
"org.http4s" %% "http4s-dsl" % http4sVersion,
|
Seq(
|
||||||
"org.slf4j" % "slf4j-nop" % "1.7.21",
|
"org.http4s" %% "http4s-blazeserver" % http4sVersion,
|
||||||
"com.github.alexarchambault" %% "case-app" % "1.1.2"
|
"org.http4s" %% "http4s-dsl" % http4sVersion,
|
||||||
)
|
"org.slf4j" % "slf4j-nop" % "1.7.21",
|
||||||
|
"com.github.alexarchambault" %% "case-app" % "1.1.2"
|
||||||
|
)
|
||||||
|
else
|
||||||
|
Seq()
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
lazy val okhttp = project
|
lazy val okhttp = project
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.8.0")
|
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.8.0")
|
||||||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13")
|
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13")
|
||||||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
|
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
|
||||||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.1.0")
|
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.4.0")
|
||||||
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.5")
|
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.5")
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M14")
|
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M14")
|
||||||
addSbtPlugin("com.typesafe.sbt" % "sbt-proguard" % "0.2.2")
|
addSbtPlugin("com.typesafe.sbt" % "sbt-proguard" % "0.2.2")
|
||||||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.9")
|
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.11")
|
||||||
libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value
|
libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
com.lihaoyi:fastparse-utils_2.11:0.3.7:default
|
com.lihaoyi:fastparse-utils_2.11:0.4.2:default
|
||||||
com.lihaoyi:fastparse_2.11:0.3.7:default
|
com.lihaoyi:fastparse_2.11:0.4.2:default
|
||||||
com.lihaoyi:sourcecode_2.11:0.1.1:default
|
com.lihaoyi:sourcecode_2.11:0.1.3:default
|
||||||
io.get-coursier:coursier_2.11:1.0.0-SNAPSHOT:compile
|
io.get-coursier:coursier_2.11:1.0.0-SNAPSHOT:compile
|
||||||
org.jsoup:jsoup:1.9.2:default
|
org.jsoup:jsoup:1.9.2:default
|
||||||
org.scala-lang:scala-library:2.11.8:default
|
org.scala-lang:scala-library:2.11.8:default
|
||||||
org.scala-lang.modules:scala-xml_2.11:1.0.5:default
|
org.scala-lang.modules:scala-xml_2.11:1.0.5:default
|
||||||
org.scalaz:scalaz-core_2.11:7.2.5:default
|
org.scalaz:scalaz-core_2.11:7.2.6:default
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue