From 8e025b92f7c13581479bdef7ae23fb50757f9004 Mon Sep 17 00:00:00 2001 From: Jules Ivanic Date: Tue, 29 Aug 2023 16:37:17 +0400 Subject: [PATCH] Fix `-target is deprecated: Use -release instead to compile against the correct platform API.` error (#265) --- .../src/main/scala/zio/sbt/ScalaCompilerSettings.scala | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/zio-sbt-ecosystem/src/main/scala/zio/sbt/ScalaCompilerSettings.scala b/zio-sbt-ecosystem/src/main/scala/zio/sbt/ScalaCompilerSettings.scala index 43cf2c0d..97341a23 100644 --- a/zio-sbt-ecosystem/src/main/scala/zio/sbt/ScalaCompilerSettings.scala +++ b/zio-sbt-ecosystem/src/main/scala/zio/sbt/ScalaCompilerSettings.scala @@ -86,15 +86,12 @@ trait ScalaCompilerSettings { "-language:implicitConversions", "-Xignore-scala2-macros", "-noindent", - "-release", - javaPlatform + s"-release:$javaPlatform" ) case Some((2, 13)) => Seq( "-Ywarn-unused:params,-implicits", - "-release", - javaPlatform, - s"-target:$javaPlatform" + s"-release:$javaPlatform" ) ++ std2xOptions ++ optimizerOptions(optimize) case Some((2, 12)) => Seq(