diff --git a/build.sbt b/build.sbt index 86a6f34..83c6520 100644 --- a/build.sbt +++ b/build.sbt @@ -47,19 +47,19 @@ lazy val compileOptions: Seq[Setting[_]] = Seq( lazy val packagerProjectSettings = Seq( name := "scala-packager", - scalaVersion := ScalaVersions.scala213, + scalaVersion := ScalaVersions.scala3, crossScalaVersions := ScalaVersions.all ) lazy val imageResizerProjectSettings = Seq( name := "scala-packager-image-resizer", - scalaVersion := ScalaVersions.scala213, + scalaVersion := ScalaVersions.scala3, crossScalaVersions := ScalaVersions.all ) lazy val cliProjectSettings = Seq( name := "scala-packager-cli", - scalaVersion := ScalaVersions.scala213, + scalaVersion := ScalaVersions.scala3, crossScalaVersions := ScalaVersions.all, libraryDependencies ++= Seq(Deps.caseApp) ) diff --git a/modules/cli/src/main/scala/packager/cli/commands/BuildOptions.scala b/modules/cli/src/main/scala/packager/cli/commands/BuildOptions.scala index 7d5fa5b..057eace 100644 --- a/modules/cli/src/main/scala/packager/cli/commands/BuildOptions.scala +++ b/modules/cli/src/main/scala/packager/cli/commands/BuildOptions.scala @@ -1,7 +1,6 @@ package packager.cli.commands -import caseapp.{Group, HelpMessage, Name, Parser, Recurse} -import caseapp.core.help.Help +import caseapp.* import packager.cli.commands.BuildOptions.PackagerType import packager.config._ @@ -109,6 +108,6 @@ object BuildOptions { case object Rpm extends NativePackagerType } - implicit val parser: Parser[BuildOptions] = Parser[BuildOptions] - implicit val help: Help[BuildOptions] = Help[BuildOptions] + implicit lazy val parser: Parser[BuildOptions] = Parser.derive + implicit lazy val help: Help[BuildOptions] = Help.derive } diff --git a/modules/cli/src/main/scala/packager/cli/commands/DebianOptions.scala b/modules/cli/src/main/scala/packager/cli/commands/DebianOptions.scala index c40fd85..c6fbf44 100644 --- a/modules/cli/src/main/scala/packager/cli/commands/DebianOptions.scala +++ b/modules/cli/src/main/scala/packager/cli/commands/DebianOptions.scala @@ -55,7 +55,7 @@ final case class DebianOptions( case object DebianOptions { - implicit val parser: Parser[DebianOptions] = Parser[DebianOptions] - implicit val help: Help[DebianOptions] = Help[DebianOptions] + implicit val parser: Parser[DebianOptions] = Parser.derive + implicit val help: Help[DebianOptions] = Help.derive } diff --git a/modules/cli/src/main/scala/packager/cli/commands/DockerOptions.scala b/modules/cli/src/main/scala/packager/cli/commands/DockerOptions.scala index 4dac244..5b1c693 100644 --- a/modules/cli/src/main/scala/packager/cli/commands/DockerOptions.scala +++ b/modules/cli/src/main/scala/packager/cli/commands/DockerOptions.scala @@ -59,7 +59,7 @@ final case class DockerOptions( case object DockerOptions { - implicit val parser: Parser[DockerOptions] = Parser[DockerOptions] - implicit val help: Help[DockerOptions] = Help[DockerOptions] + implicit val parser: Parser[DockerOptions] = Parser.derive + implicit val help: Help[DockerOptions] = Help.derive } diff --git a/modules/cli/src/main/scala/packager/cli/commands/MacOSOptions.scala b/modules/cli/src/main/scala/packager/cli/commands/MacOSOptions.scala index 6fe0b3c..5495465 100644 --- a/modules/cli/src/main/scala/packager/cli/commands/MacOSOptions.scala +++ b/modules/cli/src/main/scala/packager/cli/commands/MacOSOptions.scala @@ -23,7 +23,7 @@ final case class MacOSOptions( case object MacOSOptions { - implicit val parser: Parser[MacOSOptions] = Parser[MacOSOptions] - implicit val help: Help[MacOSOptions] = Help[MacOSOptions] + implicit val parser: Parser[MacOSOptions] = Parser.derive + implicit val help: Help[MacOSOptions] = Help.derive } diff --git a/modules/cli/src/main/scala/packager/cli/commands/RedHatOptions.scala b/modules/cli/src/main/scala/packager/cli/commands/RedHatOptions.scala index ecda205..1e0bdba 100644 --- a/modules/cli/src/main/scala/packager/cli/commands/RedHatOptions.scala +++ b/modules/cli/src/main/scala/packager/cli/commands/RedHatOptions.scala @@ -41,7 +41,7 @@ final case class RedHatOptions( case object RedHatOptions { - implicit val parser: Parser[RedHatOptions] = Parser[RedHatOptions] - implicit val help: Help[RedHatOptions] = Help[RedHatOptions] + implicit val parser: Parser[RedHatOptions] = Parser.derive + implicit val help: Help[RedHatOptions] = Help.derive } diff --git a/modules/cli/src/main/scala/packager/cli/commands/SharedOptions.scala b/modules/cli/src/main/scala/packager/cli/commands/SharedOptions.scala index 90ee876..8709faa 100644 --- a/modules/cli/src/main/scala/packager/cli/commands/SharedOptions.scala +++ b/modules/cli/src/main/scala/packager/cli/commands/SharedOptions.scala @@ -33,6 +33,6 @@ final case class SharedOptions( ) case object SharedOptions { - implicit val parser: Parser[SharedOptions] = Parser[SharedOptions] - implicit val help: Help[SharedOptions] = Help[SharedOptions] + implicit val parser: Parser[SharedOptions] = Parser.derive + implicit val help: Help[SharedOptions] = Help.derive } diff --git a/modules/cli/src/main/scala/packager/cli/commands/WindowsOptions.scala b/modules/cli/src/main/scala/packager/cli/commands/WindowsOptions.scala index 4b88756..2910287 100644 --- a/modules/cli/src/main/scala/packager/cli/commands/WindowsOptions.scala +++ b/modules/cli/src/main/scala/packager/cli/commands/WindowsOptions.scala @@ -63,6 +63,6 @@ final case class WindowsOptions( case object WindowsOptions { - implicit val parser: Parser[WindowsOptions] = Parser[WindowsOptions] - implicit val help: Help[WindowsOptions] = Help[WindowsOptions] + implicit val parser: Parser[WindowsOptions] = Parser.derive + implicit val help: Help[WindowsOptions] = Help.derive } diff --git a/project/ScalaVersions.scala b/project/ScalaVersions.scala index 819949b..33c8bdc 100644 --- a/project/ScalaVersions.scala +++ b/project/ScalaVersions.scala @@ -1,5 +1,6 @@ object ScalaVersions { def scala212 = "2.12.18" def scala213 = "2.13.11" - def all = Seq(scala213, scala212) + def scala3 = "3.3.1" + def all = Seq(scala3, scala213, scala212) }