From c918c2d830f4c161293be2975b26ba482cc1bdc8 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Mon, 3 Jan 2022 17:04:59 +0100 Subject: [PATCH] scala-parser-combinators stays on 1.x for Scala 2.x --- build.sbt | 2 +- project/Dependencies.scala | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 587b3f3..56edc1e 100644 --- a/build.sbt +++ b/build.sbt @@ -18,7 +18,7 @@ lazy val cachecontrol = (project in file(".")) .enablePlugins(Common) .settings( libraryDependencies ++= Seq( - parserCombinators, + parserCombinators(scalaVersion.value), scalaTest, slf4j, slf4jSimple % Test diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 52fc697..689ae1e 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -12,8 +12,13 @@ object Dependencies { def scalaTest = "org.scalatest" %% "scalatest" % "3.2.10" % Test - val parserCombinators = - "org.scala-lang.modules" %% "scala-parser-combinators" % "2.1.0" + def parserCombinators(scalaVersion: String) = + "org.scala-lang.modules" %% "scala-parser-combinators" % { + CrossVersion.partialVersion(scalaVersion) match { + case Some((2, _)) => "1.1.2" + case _ => "2.1.0" + } + } val slf4jVersion = "1.7.32" val slf4j = "org.slf4j" % "slf4j-api" % slf4jVersion