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)
|
||||
matrix:
|
||||
include:
|
||||
- env: TRAVIS_SCALA_VERSION=2.12.0-RC2 PUBLISH=1
|
||||
os: linux
|
||||
jdk: oraclejdk8
|
||||
- env: TRAVIS_SCALA_VERSION=2.11.8 PUBLISH=1
|
||||
os: linux
|
||||
jdk: oraclejdk8
|
||||
|
|
|
|||
92
build.sbt
92
build.sbt
|
|
@ -47,21 +47,21 @@ lazy val noPublishSettings = Seq(
|
|||
publishArtifact := false
|
||||
)
|
||||
|
||||
def noPublishForScalaVersionSettings(sbv: String) = Seq(
|
||||
def noPublishForScalaVersionSettings(sbv: String*) = Seq(
|
||||
publish := {
|
||||
if (scalaBinaryVersion.value == sbv)
|
||||
if (sbv.contains(scalaBinaryVersion.value))
|
||||
()
|
||||
else
|
||||
publish.value
|
||||
},
|
||||
publishLocal := {
|
||||
if (scalaBinaryVersion.value == sbv)
|
||||
if (sbv.contains(scalaBinaryVersion.value))
|
||||
()
|
||||
else
|
||||
publishLocal.value
|
||||
},
|
||||
publishArtifact := {
|
||||
if (scalaBinaryVersion.value == sbv)
|
||||
if (sbv.contains(scalaBinaryVersion.value))
|
||||
false
|
||||
else
|
||||
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
|
||||
.settings(commonSettings: _*)
|
||||
|
|
@ -97,7 +97,7 @@ lazy val core = crossProject
|
|||
name := "coursier",
|
||||
libraryDependencies ++= Seq(
|
||||
"org.scalaz" %%% "scalaz-core" % scalazVersion,
|
||||
"com.lihaoyi" %%% "fastparse" % "0.4.1"
|
||||
"com.lihaoyi" %%% "fastparse" % "0.4.2"
|
||||
),
|
||||
resourceGenerators.in(Compile) += {
|
||||
(target, version).map { (dir, ver) =>
|
||||
|
|
@ -229,10 +229,16 @@ lazy val tests = crossProject
|
|||
.settings(Defaults.itSettings: _*)
|
||||
.settings(
|
||||
name := "coursier-tests",
|
||||
libraryDependencies ++= Seq(
|
||||
"org.scala-lang.modules" %% "scala-async" % "0.9.5" % "provided",
|
||||
"com.lihaoyi" %%% "utest" % "0.4.4" % "test"
|
||||
),
|
||||
libraryDependencies += {
|
||||
val asyncVersion =
|
||||
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",
|
||||
testFrameworks += new TestFramework("utest.runner.Framework")
|
||||
)
|
||||
|
|
@ -329,16 +335,16 @@ lazy val bootstrap = project
|
|||
lazy val cli = project
|
||||
.dependsOn(coreJvm, cache)
|
||||
.settings(commonSettings)
|
||||
.settings(noPublishForScalaVersionSettings("2.10"))
|
||||
.settings(noPublishForScalaVersionSettings("2.10", "2.12"))
|
||||
.settings(packAutoSettings)
|
||||
.settings(proguardSettings)
|
||||
.settings(
|
||||
name := "coursier-cli",
|
||||
libraryDependencies ++= {
|
||||
if (scalaBinaryVersion.value == "2.10")
|
||||
Seq()
|
||||
else
|
||||
if (scalaBinaryVersion.value == "2.11")
|
||||
Seq("com.github.alexarchambault" %% "case-app" % "1.1.2")
|
||||
else
|
||||
Seq()
|
||||
},
|
||||
resourceGenerators in Compile += packageBin.in(bootstrap).in(Compile).map { jar =>
|
||||
Seq(jar)
|
||||
|
|
@ -352,16 +358,17 @@ lazy val cli = project
|
|||
javaOptions in (Proguard, ProguardKeys.proguard) := Seq("-Xmx3172M"),
|
||||
artifactPath in Proguard := (ProguardKeys.proguardDirectory in Proguard).value / "coursier-standalone.jar",
|
||||
artifacts ++= {
|
||||
if (scalaBinaryVersion.value == "2.10")
|
||||
Nil
|
||||
else Seq(
|
||||
Artifact(
|
||||
moduleName.value,
|
||||
"jar",
|
||||
"jar",
|
||||
"standalone"
|
||||
if (scalaBinaryVersion.value == "2.11")
|
||||
Seq(
|
||||
Artifact(
|
||||
moduleName.value,
|
||||
"jar",
|
||||
"jar",
|
||||
"standalone"
|
||||
)
|
||||
)
|
||||
)
|
||||
else
|
||||
Nil
|
||||
},
|
||||
packagedArtifacts <++= {
|
||||
(
|
||||
|
|
@ -371,9 +378,7 @@ lazy val cli = project
|
|||
packageBin.in(bootstrap) in Compile
|
||||
).map {
|
||||
(mod, sbv, files, bootstrapJar) =>
|
||||
if (sbv == "2.10")
|
||||
Map.empty[Artifact, File]
|
||||
else {
|
||||
if (sbv == "2.11") {
|
||||
import java.util.zip.{ ZipEntry, ZipOutputStream, ZipInputStream }
|
||||
import java.io.{ ByteArrayOutputStream, FileInputStream, FileOutputStream, File, InputStream, IOException }
|
||||
|
||||
|
|
@ -450,7 +455,8 @@ lazy val cli = project
|
|||
"standalone"
|
||||
) -> f
|
||||
)
|
||||
}
|
||||
} else
|
||||
Map.empty[Artifact, File]
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
@ -462,18 +468,18 @@ lazy val web = project
|
|||
.settings(noPublishSettings)
|
||||
.settings(
|
||||
libraryDependencies ++= {
|
||||
if (scalaBinaryVersion.value == "2.10")
|
||||
Seq()
|
||||
else
|
||||
if (scalaBinaryVersion.value == "2.11")
|
||||
Seq("com.github.japgolly.scalajs-react" %%% "core" % "0.9.0")
|
||||
else
|
||||
Seq()
|
||||
},
|
||||
sourceDirectory := {
|
||||
val dir = sourceDirectory.value
|
||||
|
||||
if (scalaBinaryVersion.value == "2.10")
|
||||
dir / "dummy"
|
||||
else
|
||||
if (scalaBinaryVersion.value == "2.11")
|
||||
dir
|
||||
else
|
||||
dir / "dummy"
|
||||
},
|
||||
test in Test := (),
|
||||
testOnly in Test := (),
|
||||
|
|
@ -500,7 +506,7 @@ lazy val doc = project
|
|||
lazy val plugin = project
|
||||
.dependsOn(coreJvm, cache)
|
||||
.settings(scalaVersionAgnosticCommonSettings)
|
||||
.settings(noPublishForScalaVersionSettings("2.11"))
|
||||
.settings(noPublishForScalaVersionSettings("2.11", "2.12"))
|
||||
.settings(
|
||||
name := "sbt-coursier",
|
||||
sbtPlugin := (scalaBinaryVersion.value == "2.10"),
|
||||
|
|
@ -528,14 +534,20 @@ val http4sVersion = "0.8.6"
|
|||
lazy val `http-server` = project
|
||||
.settings(commonSettings)
|
||||
.settings(packAutoSettings)
|
||||
.settings(noPublishForScalaVersionSettings("2.10", "2.12"))
|
||||
.settings(
|
||||
name := "http-server-java7",
|
||||
libraryDependencies ++= Seq(
|
||||
"org.http4s" %% "http4s-blazeserver" % http4sVersion,
|
||||
"org.http4s" %% "http4s-dsl" % http4sVersion,
|
||||
"org.slf4j" % "slf4j-nop" % "1.7.21",
|
||||
"com.github.alexarchambault" %% "case-app" % "1.1.2"
|
||||
)
|
||||
libraryDependencies ++= {
|
||||
if (scalaBinaryVersion.value == "2.11")
|
||||
Seq(
|
||||
"org.http4s" %% "http4s-blazeserver" % http4sVersion,
|
||||
"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
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.8.0")
|
||||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13")
|
||||
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("io.get-coursier" % "sbt-coursier" % "1.0.0-M14")
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
com.lihaoyi:fastparse-utils_2.11:0.3.7:default
|
||||
com.lihaoyi:fastparse_2.11:0.3.7:default
|
||||
com.lihaoyi:sourcecode_2.11:0.1.1:default
|
||||
com.lihaoyi:fastparse-utils_2.11:0.4.2:default
|
||||
com.lihaoyi:fastparse_2.11:0.4.2:default
|
||||
com.lihaoyi:sourcecode_2.11:0.1.3:default
|
||||
io.get-coursier:coursier_2.11:1.0.0-SNAPSHOT:compile
|
||||
org.jsoup:jsoup:1.9.2:default
|
||||
org.scala-lang:scala-library:2.11.8: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