diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aae70ee8..0755b3f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: - name: Check code formatting run: | cd CMT && - sbt scalafmtCheckAll + sbt "scalafmtCheckAll ; scalafmtSbtCheck" - name: Run tests run: | diff --git a/build.sbt b/build.sbt index 392483a0..9e0f6550 100644 --- a/build.sbt +++ b/build.sbt @@ -6,9 +6,8 @@ lazy val `course-management-tools` = .settings(commonSettings: _*) .settings(publish / skip := true) -lazy val core = project.in(file("core")) - .settings(commonSettings: _*) - .settings(libraryDependencies ++= Dependencies.coreDependencies) +lazy val core = + project.in(file("core")).settings(commonSettings: _*).settings(libraryDependencies ++= Dependencies.coreDependencies) lazy val cmta = project .in(file("cmta")) @@ -29,7 +28,8 @@ lazy val cmtc = project .settings(Compile / mainClass := Some("com.lunatech.cmt.client.Main")) .settings(buildInfoKeys := buildKeysWithName("Course Management Tools (Client)")) -lazy val `functional-tests` = project.in(file("functional-tests")) +lazy val `functional-tests` = project + .in(file("functional-tests")) .dependsOn(cmta, cmtc, core) .settings(commonSettings: _*) .settings(libraryDependencies ++= Dependencies.functionalTestDependencies) @@ -37,8 +37,5 @@ lazy val `functional-tests` = project.in(file("functional-tests")) lazy val docs = project .in(file("course-management-tools-docs")) - .settings( - moduleName := "course-management-tools-docs", - publish / skip := true - ) + .settings(moduleName := "course-management-tools-docs", publish / skip := true) .enablePlugins(MdocPlugin, DocusaurusPlugin) diff --git a/project/Build.scala b/project/Build.scala index 4c38f1b9..5e76d406 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -16,8 +16,7 @@ object Build { "-Wunused:explicits", "-Wunused:implicits", "-Wunused:params", - "-Wvalue-discard", - ) + "-Wvalue-discard") } lazy val commonSettings = Seq( diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 2fed390b..b23b76a1 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -29,8 +29,7 @@ object Library { "org.http4s" %% "http4s-dsl", "org.http4s" %% "http4s-blaze-server", "org.http4s" %% "http4s-blaze-client", - "org.http4s" %% "http4s-circe" - ).map(_ % Version.http4s) + "org.http4s" %% "http4s-circe").map(_ % Version.http4s) lazy val circe = "io.circe" %% "circe-generic" % Version.circe lazy val github4s = "com.47deg" %% "github4s" % Version.github4s @@ -40,8 +39,19 @@ object Dependencies { import Library._ - lazy val coreDependencies = (http4s ++ List(sbtio, typesafeConfig, scalaTest, scalaCheck, commonsCodec, caseapp, cats, devDirs, circe, github4s)).map(_.withSources()) - lazy val cmtDependencies = List(sbtio, typesafeConfig, scalaTest, scalaCheck, commonsCodec, caseapp, cats).map(_.withSources()) + lazy val coreDependencies = (http4s ++ List( + sbtio, + typesafeConfig, + scalaTest, + scalaCheck, + commonsCodec, + caseapp, + cats, + devDirs, + circe, + github4s)).map(_.withSources()) + lazy val cmtDependencies = + List(sbtio, typesafeConfig, scalaTest, scalaCheck, commonsCodec, caseapp, cats).map(_.withSources()) lazy val cmtcDependencies = (http4s ++ List(devDirs, circe, github4s, scalaTest, scalaCheck)).map(_.withSources()) lazy val functionalTestDependencies = List(scalaTest, scalaCheck).map(_.withSources()) }