From 12f53775824a9e38aeffc9b8c054855c4a0a71c8 Mon Sep 17 00:00:00 2001 From: micsza Date: Wed, 22 Nov 2023 11:23:16 +0100 Subject: [PATCH] upd --- build.sbt | 16 +++++++++++----- core/src/main/scala/Main.scala | 4 +--- core/src/test/scala/MySpec.scala | 5 ++--- project/Dependencies.scala | 20 ++++++++++++++++++++ project/Versions.scala | 3 +++ 5 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 project/Dependencies.scala diff --git a/build.sbt b/build.sbt index 9dd96ef..0959633 100644 --- a/build.sbt +++ b/build.sbt @@ -1,12 +1,11 @@ import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings +import Dependencies._ lazy val commonSettings = commonSmlBuildSettings ++ Seq( organization := "com.softwaremill.xxx", scalaVersion := "2.13.12" ) -val scalaTest = "org.scalatest" %% "scalatest" % "3.2.17" % Test - lazy val rootProject = (project in file(".")) .settings(commonSettings: _*) .settings(publishArtifact := false, name := "root") @@ -16,7 +15,14 @@ lazy val core: Project = (project in file("core")) .settings(commonSettings: _*) .settings( name := "core", - libraryDependencies ++= Seq( - scalaTest - ) + libraryDependencies ++= + scalaTest ++ + cats ++ + http4s + ) + +addCommandAlias( + "format", + "; scalafmtAll ; scalafmtSbt; Test / scalafmtAll" +) diff --git a/core/src/main/scala/Main.scala b/core/src/main/scala/Main.scala index fa06614..f56b999 100644 --- a/core/src/main/scala/Main.scala +++ b/core/src/main/scala/Main.scala @@ -1,5 +1,3 @@ - - object Main { def main(args: Array[String]) = println("hello world") -} \ No newline at end of file +} diff --git a/core/src/test/scala/MySpec.scala b/core/src/test/scala/MySpec.scala index 0263c53..c44098b 100644 --- a/core/src/test/scala/MySpec.scala +++ b/core/src/test/scala/MySpec.scala @@ -1,8 +1,7 @@ - import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec class MySpec extends AnyFlatSpec with Matchers { "This" should "do" in { - 1 + 2 should be (3) + 1 + 2 should be(3) } -} \ No newline at end of file +} diff --git a/project/Dependencies.scala b/project/Dependencies.scala new file mode 100644 index 0000000..37d2076 --- /dev/null +++ b/project/Dependencies.scala @@ -0,0 +1,20 @@ +import sbt.* + +object Dependencies { + + lazy val cats: Seq[ModuleID] = Seq( + "org.typelevel" %% "cats-core" % Versions.cats, + "org.typelevel" %% "cats-effect" % Versions.catsEffect + ) + + lazy val http4s: Seq[ModuleID] = Seq( + "org.http4s" %% "http4s-ember-client" % Versions.http4s, + "org.http4s" %% "http4s-ember-server" % Versions.http4s, + "org.http4s" %% "http4s-circe" % Versions.http4s, + "org.http4s" %% "http4s-dsl" % Versions.http4s + ) + + lazy val scalaTest: Seq[ModuleID] = Seq( + "org.scalatest" %% "scalatest" % Versions.scalaTest % Test + ) +} diff --git a/project/Versions.scala b/project/Versions.scala index 703fe04..8f4d333 100644 --- a/project/Versions.scala +++ b/project/Versions.scala @@ -1,3 +1,6 @@ object Versions { + val cats = "2.10.0" + val catsEffect = "3.5.2" val http4s = "0.23.21" + val scalaTest = "3.2.17" }