From 65b2556a2b043f40327fc52b8f9bffa4b4cb0f30 Mon Sep 17 00:00:00 2001 From: sh0hei Date: Tue, 16 Mar 2021 21:33:21 +0900 Subject: [PATCH 1/5] Drop Scala 2.10 support --- build.sbt | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/build.sbt b/build.sbt index d55ddf94..0d7bc500 100644 --- a/build.sbt +++ b/build.sbt @@ -12,8 +12,7 @@ lazy val commonSettings = inConfig(Test)(Defaults.testSettings) ++ crossScalaVersions := Seq( "2.13.0", "2.12.8", - "2.11.12", - "2.10.7" + "2.11.12" ), scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, major)) if major >= 12 => Seq( @@ -21,10 +20,8 @@ lazy val commonSettings = inConfig(Test)(Defaults.testSettings) ++ "-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" @@ -32,7 +29,7 @@ lazy val commonSettings = inConfig(Test)(Defaults.testSettings) ++ } ) -def scalac2_10Options = Seq( +def scalac2_11Options = Seq( "-encoding", "UTF-8", "-feature", "-language:_", @@ -40,10 +37,7 @@ def scalac2_10Options = Seq( "-Xlint", "-Xfuture", "-Yno-adapted-args", - "-Ywarn-dead-code" -) - -def scalac2_11Options = Seq( + "-Ywarn-dead-code", "-deprecation:false", "-Xlint", "-Xfatal-warnings", @@ -76,13 +70,12 @@ def subprojectSettings(projectName: String) = commonSettings ++ Seq( def scala2_11Dependencies = Def.setting { CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, major)) if major >= 11 => + case Some((2, major)) => 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 } } From 173ee9dc83c209a0c3bfc9427df76e6bc8222dd8 Mon Sep 17 00:00:00 2001 From: sh0hei Date: Tue, 16 Mar 2021 21:34:17 +0900 Subject: [PATCH 2/5] Update sbt to 1.4.7 --- .gitignore | 1 + project/build.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ba0b2b4c..31161091 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ bin/ .project .cache* *~ +.bsp diff --git a/project/build.properties b/project/build.properties index c0bab049..0b2e09c5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.2.8 +sbt.version=1.4.7 From 87dd28c286c3f9bf0d63cab08668c82885ea1e5a Mon Sep 17 00:00:00 2001 From: sh0hei Date: Tue, 16 Mar 2021 21:42:26 +0900 Subject: [PATCH 3/5] Update sbt-plugins --- project/plugins.sbt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c3cb80a9..75618991 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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") From 0a27b3810f5430f51a64d7cb2fbd23dc20e6947f Mon Sep 17 00:00:00 2001 From: sh0hei Date: Tue, 16 Mar 2021 21:48:09 +0900 Subject: [PATCH 4/5] Update Scala versions --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 0d7bc500..682b14eb 100644 --- a/build.sbt +++ b/build.sbt @@ -10,8 +10,8 @@ lazy val commonSettings = inConfig(Test)(Defaults.testSettings) ++ sonatypeProfileName := organization.value, scalaVersion := crossScalaVersions.value.head, crossScalaVersions := Seq( - "2.13.0", - "2.12.8", + "2.13.5", + "2.12.13", "2.11.12" ), scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match { From fb63253715fc4c1ba14f90aa51d981f5931bcc48 Mon Sep 17 00:00:00 2001 From: sh0hei Date: Tue, 16 Mar 2021 22:01:17 +0900 Subject: [PATCH 5/5] Update libraries --- build.sbt | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/build.sbt b/build.sbt index 682b14eb..33672728 100644 --- a/build.sbt +++ b/build.sbt @@ -68,24 +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)) => - 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 - ) - } -} - 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