From 34740538076ed9e4b0e001b2403ffd8c40ef17e9 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 13 Jun 2019 19:56:19 +0100 Subject: [PATCH] scala 2.13 support --- build.sbt | 5 +++-- project/build.properties | 2 +- src/main/scala/faker/faker.scala | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index d95e1bb..2a476b3 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ lazy val scalaFaker = (project in file(".")) .settings( name := "scala-faker", organization := "it.bitbl", - crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.3"), + crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.8", "2.13.0"), scalaVersion := crossScalaVersions.value.last, sbtPlugin := false, @@ -57,7 +57,8 @@ lazy val scalaFaker = (project in file(".")) scalaBinaryVersion.value match { case "2.10" => st("2.10", "2.1.7") case "2.11" => st("2.11", "2.1.7") - case "2.12" => st("2.12", "3.0.4") + case "2.12" => st("2.12", "3.0.8") + case "2.13" => st("2.13", "3.0.8") case _ => sys.error("ScalaTest not supported for scala version %s!" format version) } } diff --git a/project/build.properties b/project/build.properties index c091b86..8e682c5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=0.13.18 diff --git a/src/main/scala/faker/faker.scala b/src/main/scala/faker/faker.scala index 50a8091..42f2ba8 100755 --- a/src/main/scala/faker/faker.scala +++ b/src/main/scala/faker/faker.scala @@ -40,7 +40,7 @@ object Faker { val newKey = s.replaceFirst(key + ".", "") get(newKey, Option(x.asInstanceOf[java.util.Map[String, AnyRef]].get(key))) case Some(x: java.util.List[_]) if s.isEmpty => - Some(x.asInstanceOf[java.util.List[String]].asScala) + Some(x.asInstanceOf[java.util.List[String]].asScala.toSeq) case Some(x) => None }