Skip to content

upgrade to sbt 1 #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import ScalaModulePlugin._
import sbtcrossproject.{crossProject, CrossType}
import _root_.scalafix.sbt.BuildInfo.{scalafixVersion, scala212 => scalafixScala212}
import sys.process._

lazy val commonSettings = Seq(
// this line could be removed after https://github.com/scala/sbt-scala-module/issues/48 is fixed
licenses := Seq(("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0"))),
headerLicense := Some(HeaderLicense.Custom(
s"""|Scala (https://www.scala-lang.org)
|
Expand Down Expand Up @@ -83,7 +82,7 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform)(
val x = (baseDirectory in LocalRootProject).value.toURI.toString
val y = "https://raw.githubusercontent.com/scala/scala-collection-compat/" + sys.process
.Process("git rev-parse HEAD")
.lines_!
.lineStream_!
.head
s"-P:scalajs:mapSourceURI:$x->$y/"
},
Expand Down Expand Up @@ -315,7 +314,7 @@ inThisBuild(
state
},
commands += Command.command("ci") { state =>
val toRun =
val toRun: Seq[String] =
if (isScalafmt) {
Seq("scalafmt-test")
} else {
Expand Down Expand Up @@ -359,7 +358,7 @@ inThisBuild(
if (releaseVersion.nonEmpty && !isBinaryCompat) {
List(
preRelease,
s"$projectPrefix/publish-signed"
s"$projectPrefix/publishSigned"
)
} else {
Nil
Expand All @@ -379,6 +378,7 @@ inThisBuild(
toRun.foreach(println)
println("---------")

toRun ::: state
val newCommands = toRun.toList.map(Exec(_, None))
state.copy(remainingCommands = newCommands ::: state.remainingCommands)
}
))
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.18
sbt.version=1.2.8
11 changes: 2 additions & 9 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
if (System.getProperty("java.version").startsWith("1."))
Seq()
else
// override to version that works on Java 11,
// see https://github.com/scala/sbt-scala-module/issues/35
Seq(addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.3"))

val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).getOrElse("0.6.26")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.14")
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.0.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.4")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.7.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.0.0")