diff --git a/build.sbt b/build.sbt index 3b101819..45673410 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ name := "jadd" organization in ThisBuild := "ru.d10xa" -scalaVersion in ThisBuild := "2.13.1" +scalaVersion in ThisBuild := "2.13.3" mainClass in Compile := Some("ru.d10xa.jadd.Jadd") licenses := Seq(("MIT", url("https://opensource.org/licenses/MIT"))) description := "Command-line tool for adding dependencies to gradle/maven/sbt build files" diff --git a/src/main/scala/ru/d10xa/jadd/shortcuts/ArtifactInfoFinder.scala b/src/main/scala/ru/d10xa/jadd/shortcuts/ArtifactInfoFinder.scala index 0d28a43c..b2239286 100644 --- a/src/main/scala/ru/d10xa/jadd/shortcuts/ArtifactInfoFinder.scala +++ b/src/main/scala/ru/d10xa/jadd/shortcuts/ArtifactInfoFinder.scala @@ -1,5 +1,7 @@ package ru.d10xa.jadd.shortcuts +import java.io.FileNotFoundException + import cats.effect.Sync import cats.implicits._ import ru.d10xa.jadd.core.Artifact @@ -55,7 +57,12 @@ class ArtifactInfoFinder( ) }.toOption } - .recover { case _: NullPointerException => None } + .recover { + // https://github.com/scala/scala/pull/8443 Throw + // FileNotFoundException in Source.fromResource + case _: NullPointerException => None + case _: FileNotFoundException => None // since 2.13.3 + } } // find file by $groupId:$artifactId.json and then $groupId.json