diff --git a/build.sbt b/build.sbt index 1108ee3..4a1ab33 100644 --- a/build.sbt +++ b/build.sbt @@ -11,7 +11,6 @@ import com.indoorvivants.detective.Platform resolvers += Resolver.mavenLocal - scalaVersion := "3.8.4" scalafmtOnCompile := true organization := "io.cloud4s.cli" @@ -40,8 +39,8 @@ lazy val root = project name := "cloud4s", libraryDependencies ++= Seq( - "io.github.cquiroz" %%% "scala-java-time" % "2.6.0", - "io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.6.0", + "io.github.cquiroz" %%% "scala-java-time" % "2.7.0", + "io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.7.0", "org.typelevel" %%% "cats-effect" % "3.7.0", "com.monovore" %%% "decline" % "2.6.2", "com.monovore" %%% "decline-effect" % "2.6.2", @@ -50,10 +49,10 @@ lazy val root = project "org.scalameta" %%% "munit" % "1.3.5" % Test ), - // 2. Modos e caminhos de saída do Bindgen bindgenMode := BindgenMode.Manual( - scalaDir = (Compile / sourceDirectory).value / "scala" / "io" / "cloud4s" / "cli" / "bindings", + scalaDir = + (Compile / sourceDirectory).value / "scala" / "io" / "cloud4s" / "cli" / "bindings", cDir = (Compile / resourceDirectory).value / "scala-native" / "ssh" ), @@ -75,7 +74,13 @@ lazy val root = project // Validação de plataforma para Apple Silicon (macOS arm64) conf .withLinkingOptions( - conf.linkingOptions ++ Seq("-lcurl", "-lssh", "-lssl", "-lcrypto", "-lstdc++") + conf.linkingOptions ++ Seq( + "-lcurl", + "-lssh", + "-lssl", + "-lcrypto", + "-lstdc++" + ) ) .withLTO(LTO.none) .withMode(Mode.debug) @@ -92,17 +97,24 @@ commands += Command.command("release") { state => println("Iniciando build de produção (Release)...") // 1. Modifica a configuração para produção temporariamente - val stateWithConfig = Project.extract(state).appendWithoutSession(Seq( - Compile / nativeConfig ~= { _ - .withMode(scala.scalanative.build.Mode.releaseFast) - .withLTO(scala.scalanative.build.LTO.thin) - .withGC(scala.scalanative.build.GC.commix) - .withOptimize(true) - } - ), state) + val stateWithConfig = Project + .extract(state) + .appendWithoutSession( + Seq( + Compile / nativeConfig ~= { + _.withMode(scala.scalanative.build.Mode.releaseFast) + .withLTO(scala.scalanative.build.LTO.thin) + .withGC(scala.scalanative.build.GC.commix) + .withOptimize(true) + } + ), + state + ) // 2. Executa o build e pega o caminho do binário gerado - val (nextState, artifactFile) = Project.extract(stateWithConfig).runTask(Compile / nativeLink, stateWithConfig) + val (nextState, artifactFile) = Project + .extract(stateWithConfig) + .runTask(Compile / nativeLink, stateWithConfig) // 3. Define a pasta de destino (dist/) e o nome do arquivo final val destFile = baseDirectory.value / "dist" / artifactFile.getName @@ -112,4 +124,4 @@ commands += Command.command("release") { state => println("Build de produção concluído com sucesso!") nextState -} \ No newline at end of file +}