diff --git a/.travis.yml b/.travis.yml index 25ef3033..7afe6d8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,9 @@ matrix: - env: SBT_VERSION=1.2.8 jdk: openjdk8 scripted: sbt "-no-colors" "^^ $SBT_VERSION" ";scalafmtCheckAll;plugin/scripted;scaffold/scripted;lib/test;app/compile" - - env: SBT_VERSION=0.13.18 - jdk: openjdk8 - scripted: sbt "-no-colors" "^^ $SBT_VERSION" ";plugin/scripted;scaffold/scripted;lib/test;app/compile" + - name: "Scala 2.13" + script: + - sbt "++ 2.13.0" app/test lib/test - env: SBT_VERSION=1.1.6 jdk: openjdk11 scripted: sbt "-no-colors" "^^ $SBT_VERSION" ";plugin/scripted;scaffold/scripted;lib/test;app/compile" diff --git a/build.sbt b/build.sbt index d056bc9c..27524139 100644 --- a/build.sbt +++ b/build.sbt @@ -51,7 +51,7 @@ lazy val app = (project in file("app")) .settings( description := "Command line tool to apply templates defined on GitHub", name := "giter8", - crossScalaVersions := List(scala210, scala211, scala212), + crossScalaVersions := List(scala212, scala213), sourceDirectory in csRun := { (baseDirectory).value.getParentFile / "src" / "main" / "conscript" }, @@ -61,14 +61,13 @@ lazy val app = (project in file("app")) ) lazy val crossSbt = Seq( - crossSbtVersions := List(sbt013, sbt1), + crossSbtVersions := List(sbt1), scalaVersion := { val crossSbtVersion = (sbtVersion in pluginCrossBuild).value partialVersion(crossSbtVersion) match { - case Some((0, 13)) => scala210 case Some((1, _)) => scala212 case _ => - throw new Exception(s"unexpected sbt version: $crossSbtVersion (supported: 0.13.x or 1.X)") + throw new Exception(s"unexpected sbt version: $crossSbtVersion (supported: 1.X)") } } ) @@ -81,7 +80,7 @@ lazy val scaffold = (project in file("scaffold")) name := "sbt-giter8-scaffold", description := "sbt plugin for scaffolding giter8 templates", sbtPlugin := true, - crossScalaVersions := List(scala210, scala212), + crossScalaVersions := List(scala212), scriptedLaunchOpts ++= javaVmArgs.filter( a => Seq("-Xmx", "-Xms", "-XX").exists(a.startsWith) ), @@ -103,7 +102,7 @@ lazy val plugin = (project in file("plugin")) name := "sbt-giter8", description := "sbt plugin for testing giter8 templates", sbtPlugin := true, - crossScalaVersions := List(scala210, scala212), + crossScalaVersions := List(scala212), resolvers += Resolver.typesafeIvyRepo("releases"), scriptedLaunchOpts ++= javaVmArgs.filter( a => Seq("-Xmx", "-Xms", "-XX").exists(a.startsWith) @@ -118,12 +117,10 @@ lazy val plugin = (project in file("plugin")) val artifact = partialVersion(crossSbtVersion) match { - case Some((0, 13)) => - "org.scala-sbt" % "scripted-plugin" case Some((1, _)) => "org.scala-sbt" %% "scripted-plugin" case _ => - throw new Exception(s"unexpected sbt version: $crossSbtVersion (supported: 0.13.x or 1.X)") + throw new Exception(s"unexpected sbt version: $crossSbtVersion (supported: 1.X)") } artifact % crossSbtVersion @@ -140,7 +137,7 @@ lazy val lib = (project in file("library")) .settings( name := "giter8-lib", description := "shared library for app and plugin", - crossScalaVersions := List(scala210, scala211, scala212), + crossScalaVersions := List(scala212, scala213), libraryDependencies ++= Seq( stringTemplate, jgit, @@ -162,13 +159,7 @@ lazy val lib = (project in file("library")) def customCommands: Seq[Setting[_]] = Seq( commands += Command.command("release") { state => "clean" :: - s"++${scala210}" :: - s"^^${sbt013}" :: - "lib/publishSigned" :: - "app/publishSigned" :: - "plugin/publishSigned" :: - "scaffold/publishSigned" :: - s"++${scala211}" :: + s"++${scala213}" :: "app/publishSigned" :: "lib/publishSigned" :: s"++${scala212}" :: diff --git a/library/src/main/scala/g8.scala b/library/src/main/scala/g8.scala index 896dcc93..77aa4990 100644 --- a/library/src/main/scala/g8.scala +++ b/library/src/main/scala/g8.scala @@ -451,7 +451,7 @@ object G8 { print(s"$k [$message]: ") Console.flush() // Gotta flush for Windows console! - val in = Console.readLine().trim + val in = scala.io.StdIn.readLine().trim (k, if (in.isEmpty) default else in) } ) diff --git a/plugin/src/main/scala-sbt-0.13/sbt/sbtgiter8/SBTCompat.scala b/plugin/src/main/scala-sbt-0.13/sbt/sbtgiter8/SBTCompat.scala deleted file mode 100644 index d9fcdd60..00000000 --- a/plugin/src/main/scala-sbt-0.13/sbt/sbtgiter8/SBTCompat.scala +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Original implementation (C) 2010-2015 Nathan Hamblen and contributors - * Adapted and extended in 2016 by foundweekends project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package sbt -package sbtgiter8 - -object SBTCompat extends ScriptedCompat - -trait ScriptedCompat { - val scriptedSettings = sbt.ScriptedPlugin.scriptedSettings - val sbtLauncher = sbt.ScriptedPlugin.sbtLauncher - val sbtTestDirectory = sbt.ScriptedPlugin.sbtTestDirectory - val scripted = sbt.ScriptedPlugin.scripted - val scriptedBufferLog = sbt.ScriptedPlugin.scriptedBufferLog - val scriptedClasspath = sbt.ScriptedPlugin.scriptedClasspath - val scriptedDependencies = sbt.ScriptedPlugin.scriptedDependencies - val scriptedLaunchOpts = sbt.ScriptedPlugin.scriptedLaunchOpts - val scriptedRun = sbt.ScriptedPlugin.scriptedRun - val scriptedSbt = sbt.ScriptedPlugin.scriptedSbt - val scriptedTask = sbt.ScriptedPlugin.scriptedTask - val scriptedTests = sbt.ScriptedPlugin.scriptedTests -} diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 22f408bf..7c887a54 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -15,16 +15,14 @@ object Dependencies { ExclusionRule("com.sun.jmx", "jmxri") ) val scopt = "com.github.scopt" %% "scopt" % "3.7.1" - val scalacheck = "org.scalacheck" %% "scalacheck" % "1.13.5" + val scalacheck = "org.scalacheck" %% "scalacheck" % "1.14.0" val scalatest = "org.scalatest" %% "scalatest" % "3.0.8" - val scalamock = "org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" - val sbtIo = "org.scala-sbt" %% "io" % "1.2.2" - val scala210 = "2.10.7" - val scala211 = "2.11.12" + val scalamock = "org.scalamock" %% "scalamock" % "4.3.0" + val sbtIo = "org.scala-sbt" %% "io" % "1.3.0-M13" val scala212 = "2.12.8" + val scala213 = "2.13.0" val sbt1 = "1.2.8" - val sbt013 = "0.13.17" - val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.1.0" - val parserCombinator = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0" + val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.2.0" + val parserCombinator = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2" val logback = "ch.qos.logback" % "logback-classic" % "1.2.3" }