diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..3550a30f --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36c1c717..4f5efce9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,8 +27,8 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [3.1.2] - java: [graal_21.3.0@11] + scala: [3.2.0] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -36,12 +36,12 @@ jobs: with: fetch-depth: 0 - - name: Setup GraalVM (graal_21.3.0@11) - if: matrix.java == 'graal_21.3.0@11' - uses: DeLaGuardo/setup-graalvm@5.0 + - name: Setup Java (temurin@11) + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v2 with: - graalvm: 21.3.0 - java: java11 + distribution: temurin + java-version: 11 - name: Cache sbt uses: actions/cache@v2 @@ -62,7 +62,7 @@ jobs: run: sbt ++${{ matrix.scala }} test - name: Compress target directories - run: tar cf targets.tar target project/target + run: tar cf targets.tar target app/.jvm/target app/.native/target project/target - name: Upload target directories uses: actions/upload-artifact@v2 @@ -77,8 +77,8 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [3.1.2] - java: [graal_21.3.0@11] + scala: [3.2.0] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -86,12 +86,12 @@ jobs: with: fetch-depth: 0 - - name: Setup GraalVM (graal_21.3.0@11) - if: matrix.java == 'graal_21.3.0@11' - uses: DeLaGuardo/setup-graalvm@5.0 + - name: Setup Java (temurin@11) + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v2 with: - graalvm: 21.3.0 - java: java11 + distribution: temurin + java-version: 11 - name: Cache sbt uses: actions/cache@v2 @@ -105,12 +105,12 @@ jobs: ~/Library/Caches/Coursier/v1 key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Download target directories (3.1.2) + - name: Download target directories (3.2.0) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-3.1.2-${{ matrix.java }} + name: target-${{ matrix.os }}-3.2.0-${{ matrix.java }} - - name: Inflate target directories (3.1.2) + - name: Inflate target directories (3.2.0) run: | tar xf targets.tar rm targets.tar diff --git a/.sbtopts b/.sbtopts new file mode 100644 index 00000000..81a05471 --- /dev/null +++ b/.sbtopts @@ -0,0 +1 @@ +-J-Xmx8G diff --git a/app/.jvm/src/main/scala/com/kubukoz/next/RuntimePlatform.scala b/app/.jvm/src/main/scala/com/kubukoz/next/RuntimePlatform.scala new file mode 100644 index 00000000..d950b843 --- /dev/null +++ b/app/.jvm/src/main/scala/com/kubukoz/next/RuntimePlatform.scala @@ -0,0 +1,7 @@ +package com.kubukoz.next + +import cats.effect.unsafe.IORuntime + +object RuntimePlatform { + val default: IORuntime = IORuntime.global +} diff --git a/app/.native/src/main/scala/com/kubukoz/next/RuntimePlatform.scala b/app/.native/src/main/scala/com/kubukoz/next/RuntimePlatform.scala new file mode 100644 index 00000000..b4918a98 --- /dev/null +++ b/app/.native/src/main/scala/com/kubukoz/next/RuntimePlatform.scala @@ -0,0 +1,8 @@ +package com.kubukoz.next + +import epollcat.unsafe.EpollRuntime +import cats.effect.unsafe.IORuntime + +object RuntimePlatform { + val default: IORuntime = EpollRuntime.global +} diff --git a/src/main/resources/logback.xml b/app/src/main/resources/logback.xml similarity index 100% rename from src/main/resources/logback.xml rename to app/src/main/resources/logback.xml diff --git a/src/main/scala/com/kubukoz/next/Analysis.scala b/app/src/main/scala/com/kubukoz/next/Analysis.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/Analysis.scala rename to app/src/main/scala/com/kubukoz/next/Analysis.scala diff --git a/src/main/scala/com/kubukoz/next/ConfigLoader.scala b/app/src/main/scala/com/kubukoz/next/ConfigLoader.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/ConfigLoader.scala rename to app/src/main/scala/com/kubukoz/next/ConfigLoader.scala diff --git a/src/main/scala/com/kubukoz/next/Login.scala b/app/src/main/scala/com/kubukoz/next/Login.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/Login.scala rename to app/src/main/scala/com/kubukoz/next/Login.scala diff --git a/src/main/scala/com/kubukoz/next/LoginProcess.scala b/app/src/main/scala/com/kubukoz/next/LoginProcess.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/LoginProcess.scala rename to app/src/main/scala/com/kubukoz/next/LoginProcess.scala diff --git a/src/main/scala/com/kubukoz/next/Main.scala b/app/src/main/scala/com/kubukoz/next/Main.scala similarity index 94% rename from src/main/scala/com/kubukoz/next/Main.scala rename to app/src/main/scala/com/kubukoz/next/Main.scala index 3c93b32f..3a86b0a9 100644 --- a/src/main/scala/com/kubukoz/next/Main.scala +++ b/app/src/main/scala/com/kubukoz/next/Main.scala @@ -15,7 +15,9 @@ import cats.effect.implicits.* import java.io.EOFException import LoginProcess.given import org.typelevel.log4cats.Logger -import org.typelevel.log4cats.slf4j.Slf4jLogger +// import org.typelevel.log4cats.slf4j.Slf4jLogger +import org.typelevel.log4cats.noop.NoOpLogger +import cats.effect.unsafe.IORuntime enum Choice { case Login @@ -57,19 +59,19 @@ object Choice { object Main extends CommandIOApp(name = "spotify-next", header = "spotify-next: Gather great music.", version = BuildInfo.version) { + override protected def runtime: IORuntime = RuntimePlatform.default + import Program.* - given Logger[IO] = Slf4jLogger.getLogger[IO] + given Logger[IO] = NoOpLogger[IO] + // given Logger[IO] = Slf4jLogger.getLogger[IO] def makeProgram[F[_]: Async: Console: Logger]: Resource[F, Runner[F]] = { given UserOutput[F] = UserOutput.toConsole(sonos.baseUri) - val dummy = Async[F].unit.toResource - for { given ConfigLoader[F] <- makeLoader[F].toResource rawClient <- makeBasicClient[F] given Config.Ask[F] = ConfigLoader[F].configAsk - _ <- dummy // obviously quite a lot of duplication here... spotifyLogin = Login.ember[F](OAuth.fromKernel[F](rawClient, OAuth.spotify)) spotifyLoginProcess = LoginProcess diff --git a/src/main/scala/com/kubukoz/next/OAuth.scala b/app/src/main/scala/com/kubukoz/next/OAuth.scala similarity index 95% rename from src/main/scala/com/kubukoz/next/OAuth.scala rename to app/src/main/scala/com/kubukoz/next/OAuth.scala index 0c3edaf2..938a61ff 100644 --- a/src/main/scala/com/kubukoz/next/OAuth.scala +++ b/app/src/main/scala/com/kubukoz/next/OAuth.scala @@ -39,14 +39,19 @@ object OAuth { private val baseUri = uri"https://accounts.spotify.com" def refreshToken(token: RefreshToken): F[Token] = - client - .fetchAs[RefreshedTokenResponse](kernel.refreshToken(token)) + kernel + .refreshToken(token) + .flatMap( + client + .fetchAs[RefreshedTokenResponse](_) + ) .map(_.access_token) .map(Token(_)) def getTokens(code: Code): F[Tokens] = - client - .expect[TokenResponse](kernel.getTokens(code)) + kernel + .getTokens(code) + .flatMap(client.expect[TokenResponse](_)) .map { response => Tokens(Token(response.access_token), RefreshToken(response.refresh_token)) } diff --git a/src/main/scala/com/kubukoz/next/Program.scala b/app/src/main/scala/com/kubukoz/next/Program.scala similarity index 95% rename from src/main/scala/com/kubukoz/next/Program.scala rename to app/src/main/scala/com/kubukoz/next/Program.scala index 27194fe8..70bab4a2 100644 --- a/src/main/scala/com/kubukoz/next/Program.scala +++ b/app/src/main/scala/com/kubukoz/next/Program.scala @@ -95,12 +95,15 @@ object Program { def sonosMiddlewares[F[_]: MonadCancelThrow]: Client[F] => Client[F] = middlewares.defaultContentType(`Content-Type`(MediaType.application.json, Charset.`UTF-8`)) - def makeSpotify[F[_]: UserOutput: ConfigLoader: Concurrent](spotifyClient: Client[F], sonosClient: Client[F]): F[Spotify[F]] = + def makeSpotify[F[_]: UserOutput: ConfigLoader: Concurrent](spotifyClient: Client[F], sonosClient: Client[F]): F[Spotify[F]] = { + val spotifyBaseUri = com.kubukoz.next.api.spotify.baseUri + for { - given SpotifyApi[F] <- SimpleRestJsonBuilder(SpotifyApiGen).client[F](spotifyClient, com.kubukoz.next.api.spotify.baseUri).liftTo[F] - given SonosApi[F] <- SimpleRestJsonBuilder(SonosApiGen).client[F](sonosClient, sonos.baseUri).liftTo[F] + given SpotifyApi[F] <- SimpleRestJsonBuilder(SpotifyApiGen).client[F](spotifyClient).uri(spotifyBaseUri).use.liftTo[F] + given SonosApi[F] <- SimpleRestJsonBuilder(SonosApiGen).client[F](sonosClient).uri(sonos.baseUri).use.liftTo[F] result <- makeSpotifyInternal[F] } yield result + } def makeSpotifyInternal[F[_]: UserOutput: SpotifyApi: SonosApi: ConfigLoader: Concurrent]: F[Spotify[F]] = { given Spotify.DeviceInfo[F] = Spotify.DeviceInfo.instance diff --git a/src/main/scala/com/kubukoz/next/RefreshTokenProcess.scala b/app/src/main/scala/com/kubukoz/next/RefreshTokenProcess.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/RefreshTokenProcess.scala rename to app/src/main/scala/com/kubukoz/next/RefreshTokenProcess.scala diff --git a/src/main/scala/com/kubukoz/next/Runner.scala b/app/src/main/scala/com/kubukoz/next/Runner.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/Runner.scala rename to app/src/main/scala/com/kubukoz/next/Runner.scala diff --git a/src/main/scala/com/kubukoz/next/Spotify.scala b/app/src/main/scala/com/kubukoz/next/Spotify.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/Spotify.scala rename to app/src/main/scala/com/kubukoz/next/Spotify.scala diff --git a/src/main/scala/com/kubukoz/next/SpotifyChoice.scala b/app/src/main/scala/com/kubukoz/next/SpotifyChoice.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/SpotifyChoice.scala rename to app/src/main/scala/com/kubukoz/next/SpotifyChoice.scala diff --git a/src/main/scala/com/kubukoz/next/UserMessage.scala b/app/src/main/scala/com/kubukoz/next/UserMessage.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/UserMessage.scala rename to app/src/main/scala/com/kubukoz/next/UserMessage.scala diff --git a/src/main/scala/com/kubukoz/next/api/sonos.scala b/app/src/main/scala/com/kubukoz/next/api/sonos.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/api/sonos.scala rename to app/src/main/scala/com/kubukoz/next/api/sonos.scala diff --git a/src/main/scala/com/kubukoz/next/api/spotify.scala b/app/src/main/scala/com/kubukoz/next/api/spotify.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/api/spotify.scala rename to app/src/main/scala/com/kubukoz/next/api/spotify.scala diff --git a/src/main/scala/com/kubukoz/next/client/spotify.scala b/app/src/main/scala/com/kubukoz/next/client/spotify.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/client/spotify.scala rename to app/src/main/scala/com/kubukoz/next/client/spotify.scala diff --git a/src/main/scala/com/kubukoz/next/util/ConsoleRead.scala b/app/src/main/scala/com/kubukoz/next/util/ConsoleRead.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/util/ConsoleRead.scala rename to app/src/main/scala/com/kubukoz/next/util/ConsoleRead.scala diff --git a/src/main/scala/com/kubukoz/next/util/config.scala b/app/src/main/scala/com/kubukoz/next/util/config.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/util/config.scala rename to app/src/main/scala/com/kubukoz/next/util/config.scala diff --git a/src/main/scala/com/kubukoz/next/util/middlewares.scala b/app/src/main/scala/com/kubukoz/next/util/middlewares.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/util/middlewares.scala rename to app/src/main/scala/com/kubukoz/next/util/middlewares.scala diff --git a/src/main/scala/com/kubukoz/next/util/mtl.scala b/app/src/main/scala/com/kubukoz/next/util/mtl.scala similarity index 100% rename from src/main/scala/com/kubukoz/next/util/mtl.scala rename to app/src/main/scala/com/kubukoz/next/util/mtl.scala diff --git a/app/src/main/scala/monocle/Lens.scala b/app/src/main/scala/monocle/Lens.scala new file mode 100644 index 00000000..85e87b91 --- /dev/null +++ b/app/src/main/scala/monocle/Lens.scala @@ -0,0 +1,47 @@ +package monocle + +import cats.Functor + +type Lens[S, A] = PLens[S, S, A, A] + +object Lens { + + def apply[S, A](_get: S => A)(_set: A => S => S): Lens[S, A] = new Lens[S, A] { + + def get(s: S): A = _get(s) + + def set(s: S, a: A): S = _set(a)(s) + } + +} + +trait PLens[S, T, A, B] { + def get(s: S): A + def set(s: S, b: B): T + def replace(b: B): S => T = set(_, b) + + def asGetter: Getter[S, A] = get(_) + + def modifyF[F[_]: Functor](f: A => F[B])(s: S): F[T] = Functor[F].map(f(get(s)))(set(s, _)) +} + +object PLens { + + def apply[S, T, A, B](_get: S => A)(_set: B => S => T): PLens[S, T, A, B] = new PLens[S, T, A, B] { + + def get(s: S): A = _get(s) + + def set(s: S, b: B): T = _set(b)(s) + + } + +} + +trait Getter[S, A] { + def get(s: S): A + def map[B](f: A => B): Getter[S, B] = s => f(get(s)) +} + +object syntax { + object all {} +} diff --git a/src/main/smithy/sonos.smithy b/app/src/main/smithy/sonos.smithy similarity index 100% rename from src/main/smithy/sonos.smithy rename to app/src/main/smithy/sonos.smithy diff --git a/src/main/smithy/spotify.smithy b/app/src/main/smithy/spotify.smithy similarity index 100% rename from src/main/smithy/spotify.smithy rename to app/src/main/smithy/spotify.smithy diff --git a/src/test/scala/com/kubukoz/next/SpotifyChoiceTests.scala b/app/src/test/scala/com/kubukoz/next/SpotifyChoiceTests.scala similarity index 100% rename from src/test/scala/com/kubukoz/next/SpotifyChoiceTests.scala rename to app/src/test/scala/com/kubukoz/next/SpotifyChoiceTests.scala diff --git a/build.sbt b/build.sbt index 03aaccd0..ceaec638 100644 --- a/build.sbt +++ b/build.sbt @@ -15,9 +15,8 @@ inThisBuild( ) Global / onChangedBuildSource := ReloadOnSourceChanges -(ThisBuild / scalaVersion) := "3.1.2" +ThisBuild / scalaVersion := "3.2.0" -ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.graalvm("21.3.0", "11")) ThisBuild / githubWorkflowTargetTags := Seq("v*") ThisBuild / githubWorkflowPublishTargetBranches := List(RefPredicate.StartsWith(Ref.Tag("v")), RefPredicate.Equals(Ref.Branch("main"))) @@ -65,8 +64,8 @@ val commonSettings = Seq( ), libraryDependencies ++= Seq( "org.typelevel" %%% "cats-effect" % "3.3.14", - "org.scalameta" %%% "munit" % "0.7.29" % Test, - "org.typelevel" %% "munit-cats-effect-3" % "1.0.7" % Test + "org.scalameta" %%% "munit" % "1.0.0-M6" % Test, + "org.typelevel" %%% "munit-cats-effect" % "2.0.0-M3" % Test ), addCompilerPlugins, Compile / doc / sources := Nil @@ -118,29 +117,49 @@ val front = project .dependsOn(core) */ +val app = crossProject(JVMPlatform, NativePlatform) + .crossType(CrossType.Pure) + .settings(commonSettings) + .settings( + libraryDependencies ++= Seq( + "com.disneystreaming.smithy4s" %%% "smithy4s-http4s" % smithy4sVersion.value, + "org.typelevel" %%% "cats-mtl" % "1.3.0", + "com.monovore" %%% "decline-effect" % "2.3.1", + "org.http4s" %%% "http4s-dsl" % "0.23.16", + "org.http4s" %%% "http4s-ember-server" % "0.23.16", + "org.http4s" %%% "http4s-ember-client" % "0.23.16", + "org.http4s" %%% "http4s-circe" % "0.23.16", + "io.circe" %%% "circe-parser" % "0.14.3", + "org.typelevel" %%% "log4cats-noop" % "2.5.0" + // waiting + // "dev.optics" %%% "monocle-core" % "3.1.0" + ), + buildInfoKeys := Seq[BuildInfoKey](version), + buildInfoPackage := "com.kubukoz.next" + ) + .settings(name := "spotify-next") + .enablePlugins(BuildInfoPlugin) + .settings( + Compile / smithy4sInputDir := (ThisBuild / baseDirectory).value / "app" / "src" / "main" / "smithy" + ) + .enablePlugins(Smithy4sCodegenPlugin) + .jvmConfigure( + _.settings( + libraryDependencies ++= Seq( + "ch.qos.logback" % "logback-classic" % "1.2.11" + ) + ).enablePlugins(JavaAppPackaging) + ) + .nativeConfigure( + _.settings( + libraryDependencies ++= Seq( + "com.armanbilge" %%% "epollcat" % "0.1.1" + ) + ) + ) + val root = project .in(file(".")) - .settings(commonSettings) - .settings( - libraryDependencies ++= Seq( - "com.disneystreaming.smithy4s" %% "smithy4s-http4s" % smithy4sVersion.value, - "org.typelevel" %% "cats-mtl" % "1.3.0", - "com.monovore" %% "decline-effect" % "2.3.0", - "org.http4s" %% "http4s-dsl" % "0.23.13", - "org.http4s" %% "http4s-ember-server" % "0.23.12", - "org.http4s" %% "http4s-ember-client" % "0.23.12", - "org.http4s" %% "http4s-circe" % "0.23.13", - "ch.qos.logback" % "logback-classic" % "1.2.11", - "io.circe" %% "circe-parser" % "0.14.2", - "dev.optics" %% "monocle-core" % "3.1.0" - ), - buildInfoKeys := Seq[BuildInfoKey](version), - buildInfoPackage := "com.kubukoz.next" - ) - .settings(name := "spotify-next") - .enablePlugins(BuildInfoPlugin) - .enablePlugins(JavaAppPackaging) - .enablePlugins(Smithy4sCodegenPlugin) -// .dependsOn(core) -// .aggregate(core /* , front */ ) + .enablePlugins(NoPublishPlugin) + .aggregate(app.componentProjects.map(p => p: ProjectReference): _*) diff --git a/core/src/main/scala/com/kubukoz/next/Model.scala b/core/src/main/scala/com/kubukoz/next/Model.scala deleted file mode 100644 index 4c4403fe..00000000 --- a/core/src/main/scala/com/kubukoz/next/Model.scala +++ /dev/null @@ -1,5 +0,0 @@ -package com.kubukoz.next - -import cats.data.NonEmptyList - -case class Model(value: NonEmptyList[(Char, Int)]) diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..011b1d19 --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1664152164, + "narHash": "sha256-UQBQ390B2g7tIT4bULsgwXJeFdJxtlwoe25Ge25B7Go=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "70168c4fde028ec5f7876da7c662cd9a7854c267", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..803fe5e5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,17 @@ +{ + inputs.nixpkgs.url = "github:nixos/nixpkgs"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils, ... }@inputs: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells.default = pkgs.mkShell { + nativeBuildInputs = [ pkgs.s2n-tls ]; + }; + } + ); +} diff --git a/pkgs.nix b/pkgs.nix deleted file mode 100644 index 0f30c201..00000000 --- a/pkgs.nix +++ /dev/null @@ -1,4 +0,0 @@ -builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz"; - sha256 = "1wg61h4gndm3vcprdcg7rc4s1v3jkm5xd7lw8r2f67w502y94gcy"; -} diff --git a/project/NoPublishPlugin.scala b/project/NoPublishPlugin.scala new file mode 100644 index 00000000..86b4ef24 --- /dev/null +++ b/project/NoPublishPlugin.scala @@ -0,0 +1,15 @@ +import sbt._ + +import Keys._ + +object NoPublishPlugin extends AutoPlugin { + override def trigger = noTrigger + + override def projectSettings = Seq( + publish := {}, + publishLocal := {}, + publishArtifact := false, + publish / skip := true + ) + +} diff --git a/project/build.properties b/project/build.properties index c8fcab54..22af2628 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.7.1 diff --git a/project/plugins.sbt b/project/plugins.sbt index f00f422d..849a8787 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -8,4 +8,6 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.20.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") -addSbtPlugin("com.disneystreaming.smithy4s" % "smithy4s-sbt-codegen" % "0.15.0") +addSbtPlugin("com.disneystreaming.smithy4s" % "smithy4s-sbt-codegen" % "0.16.2") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") diff --git a/shell.nix b/shell.nix deleted file mode 100644 index e62bf0e7..00000000 --- a/shell.nix +++ /dev/null @@ -1,10 +0,0 @@ -let - nixpkgs = import ./pkgs.nix; - sbt-overlay = self: super: rec { - jre = self.jdk11; - jdk = self.jdk11; - scala = super.scala.override { inherit jre; }; - }; - pkgs = import nixpkgs { overlays = [ sbt-overlay ]; }; -in -pkgs.mkShell { buildInputs = with pkgs;[ sbt nodejs-12_x ]; }