Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ bin/
.project
.cache*
*~
.bsp
37 changes: 11 additions & 26 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,34 @@ lazy val commonSettings = inConfig(Test)(Defaults.testSettings) ++
sonatypeProfileName := organization.value,
scalaVersion := crossScalaVersions.value.head,
crossScalaVersions := Seq(
"2.13.0",
"2.12.8",
"2.11.12",
"2.10.7"
"2.13.5",
"2.12.13",
"2.11.12"
),
scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, major)) if major >= 12 => Seq(
"-Xlint:-unused,_", "-Ywarn-unused:imports",
"-language:postfixOps", "-language:implicitConversions",
"-deprecation", "-feature"
)
case Some((2, major)) if major >= 11 =>
scalac2_10Options ++ scalac2_11Options
case _ =>
scalac2_10Options
scalac2_11Options
}),
credentials ++= {
val creds = Path.userHome / ".m2" / "credentials"
if (creds.exists) Seq(Credentials(creds)) else Nil
}
)

def scalac2_10Options = Seq(
def scalac2_11Options = Seq(
"-encoding", "UTF-8",
"-feature",
"-language:_",
"-unchecked",
"-Xlint",
"-Xfuture",
"-Yno-adapted-args",
"-Ywarn-dead-code"
)

def scalac2_11Options = Seq(
"-Ywarn-dead-code",
"-deprecation:false",
"-Xlint",
"-Xfatal-warnings",
Expand Down Expand Up @@ -74,25 +68,16 @@ def subprojectSettings(projectName: String) = commonSettings ++ Seq(
(baseDirectory.value / ".." / "formatterPreferences.properties").getPath)
)

def scala2_11Dependencies = Def.setting {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, major)) if major >= 11 =>
val parserV = if (major == 11) "1.1.1" else "1.1.2" // cf https://github.com/scala/scala-parser-combinators/issues/197
Seq(
"org.scala-lang.modules" %% "scala-xml" % "1.2.0",
"org.scala-lang.modules" %% "scala-parser-combinators" % parserV
)
case _ => Nil
}
}

lazy val scalariform = (project
enablePlugins(BuildInfoPlugin)
settings(subprojectSettings("scalariform"))
settings(publishSettings("scalariform"))
settings(
libraryDependencies ++= scala2_11Dependencies.value,
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.0-SNAP13" % Test,
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % "1.3.0",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.2.0-M2",
"org.scalatest" %% "scalatest" % "3.1.0-SNAP13" % Test
),
// sbt doesn't automatically load the content of the MANIFST.MF file, therefore
// we have to do it here by ourselves. Furthermore, the version format in the
// MANIFEST.MF is `version.qualifier`, which means that we have to replace
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.8
sbt.version=1.4.7
10 changes: 5 additions & 5 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1")