mirror of https://github.com/sbt/sbt.git
parent
6e9a8241d4
commit
dec2ba2d07
|
|
@ -2,7 +2,6 @@ language: scala
|
||||||
jdk: oraclejdk8
|
jdk: oraclejdk8
|
||||||
|
|
||||||
scala:
|
scala:
|
||||||
- 2.11.12
|
|
||||||
- 2.12.7
|
- 2.12.7
|
||||||
|
|
||||||
script: sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M
|
script: sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M
|
||||||
|
|
|
||||||
29
build.sbt
29
build.sbt
|
|
@ -2,6 +2,17 @@ import Dependencies._
|
||||||
import Util._
|
import Util._
|
||||||
import com.typesafe.tools.mima.core._, ProblemFilters._
|
import com.typesafe.tools.mima.core._, ProblemFilters._
|
||||||
|
|
||||||
|
ThisBuild / git.baseVersion := "1.3.0"
|
||||||
|
ThisBuild / version := {
|
||||||
|
val old = (ThisBuild / version).value
|
||||||
|
nightlyVersion match {
|
||||||
|
case Some(v) => v
|
||||||
|
case _ =>
|
||||||
|
if (old contains "SNAPSHOT") git.baseVersion.value + "-SNAPSHOT"
|
||||||
|
else old
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def internalPath = file("internal")
|
def internalPath = file("internal")
|
||||||
|
|
||||||
def commonSettings: Seq[Setting[_]] = Seq(
|
def commonSettings: Seq[Setting[_]] = Seq(
|
||||||
|
|
@ -13,7 +24,7 @@ def commonSettings: Seq[Setting[_]] = Seq(
|
||||||
// concurrentRestrictions in Global += Util.testExclusiveRestriction,
|
// concurrentRestrictions in Global += Util.testExclusiveRestriction,
|
||||||
testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-w", "1"),
|
testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-w", "1"),
|
||||||
javacOptions in compile ++= Seq("-Xlint", "-Xlint:-serial"),
|
javacOptions in compile ++= Seq("-Xlint", "-Xlint:-serial"),
|
||||||
crossScalaVersions := Seq(scala211, scala212),
|
crossScalaVersions := Seq(scala212),
|
||||||
scalacOptions in console in Compile -= "-Ywarn-unused-import",
|
scalacOptions in console in Compile -= "-Ywarn-unused-import",
|
||||||
scalacOptions in console in Test -= "-Ywarn-unused-import",
|
scalacOptions in console in Test -= "-Ywarn-unused-import",
|
||||||
publishArtifact in Compile := true,
|
publishArtifact in Compile := true,
|
||||||
|
|
@ -45,12 +56,6 @@ lazy val utilRoot: Project = (project in file("."))
|
||||||
.settings(
|
.settings(
|
||||||
inThisBuild(
|
inThisBuild(
|
||||||
Seq(
|
Seq(
|
||||||
git.baseVersion := "1.3.0",
|
|
||||||
version := {
|
|
||||||
val v = version.value
|
|
||||||
if (v contains "SNAPSHOT") git.baseVersion.value + "-SNAPSHOT"
|
|
||||||
else v
|
|
||||||
},
|
|
||||||
bintrayPackage := "util",
|
bintrayPackage := "util",
|
||||||
homepage := Some(url("https://github.com/sbt/util")),
|
homepage := Some(url("https://github.com/sbt/util")),
|
||||||
description := "Util module for sbt",
|
description := "Util module for sbt",
|
||||||
|
|
@ -93,7 +98,7 @@ lazy val utilLogging = (project in internalPath / "util-logging")
|
||||||
.dependsOn(utilInterface)
|
.dependsOn(utilInterface)
|
||||||
.settings(
|
.settings(
|
||||||
commonSettings,
|
commonSettings,
|
||||||
crossScalaVersions := Seq(scala211, scala212),
|
crossScalaVersions := Seq(scala212),
|
||||||
name := "Util Logging",
|
name := "Util Logging",
|
||||||
libraryDependencies ++=
|
libraryDependencies ++=
|
||||||
Seq(jline, log4jApi, log4jCore, disruptor, sjsonnewScalaJson.value, scalaReflect.value),
|
Seq(jline, log4jApi, log4jCore, disruptor, sjsonnewScalaJson.value, scalaReflect.value),
|
||||||
|
|
@ -166,13 +171,7 @@ lazy val utilScripted = (project in internalPath / "util-scripted")
|
||||||
.settings(
|
.settings(
|
||||||
commonSettings,
|
commonSettings,
|
||||||
name := "Util Scripted",
|
name := "Util Scripted",
|
||||||
libraryDependencies ++= {
|
libraryDependencies += parserCombinator,
|
||||||
scalaVersion.value match {
|
|
||||||
case sv if sv startsWith "2.11" => Seq(parserCombinator211)
|
|
||||||
case sv if sv startsWith "2.12" => Seq(parserCombinator211)
|
|
||||||
case _ => Seq()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mimaSettings,
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtIO)
|
.configure(addSbtIO)
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@ import Keys._
|
||||||
import sbt.contraband.ContrabandPlugin.autoImport._
|
import sbt.contraband.ContrabandPlugin.autoImport._
|
||||||
|
|
||||||
object Dependencies {
|
object Dependencies {
|
||||||
val scala211 = "2.11.12"
|
|
||||||
val scala212 = "2.12.8"
|
val scala212 = "2.12.8"
|
||||||
|
|
||||||
private val ioVersion = "1.2.1"
|
def nightlyVersion: Option[String] = sys.props.get("sbt.build.version")
|
||||||
|
|
||||||
|
private val ioVersion = nightlyVersion.getOrElse("1.3.0-M10")
|
||||||
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
||||||
|
|
||||||
def getSbtModulePath(key: String, name: String) = {
|
def getSbtModulePath(key: String, name: String) = {
|
||||||
|
|
@ -40,8 +40,8 @@ object Dependencies {
|
||||||
val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }
|
val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }
|
||||||
|
|
||||||
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.14.0" % Test
|
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.14.0" % Test
|
||||||
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.5" % Test
|
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.6-SNAP5" % Test
|
||||||
val parserCombinator211 = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4"
|
val parserCombinator = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
|
||||||
|
|
||||||
val sjsonnew = Def.setting {
|
val sjsonnew = Def.setting {
|
||||||
"com.eed3si9n" %% "sjson-new-core" % contrabandSjsonNewVersion.value
|
"com.eed3si9n" %% "sjson-new-core" % contrabandSjsonNewVersion.value
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ object Util {
|
||||||
crossPaths := false,
|
crossPaths := false,
|
||||||
compileOrder := CompileOrder.JavaThenScala,
|
compileOrder := CompileOrder.JavaThenScala,
|
||||||
unmanagedSourceDirectories in Compile := Seq((javaSource in Compile).value),
|
unmanagedSourceDirectories in Compile := Seq((javaSource in Compile).value),
|
||||||
crossScalaVersions := Seq(Dependencies.scala211),
|
crossScalaVersions := Seq(Dependencies.scala212),
|
||||||
autoScalaLibrary := false
|
autoScalaLibrary := false
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue