Skip to content

Commit 7d9df65

Browse files
authored
Sbt catalysts (#17)
1 parent 04d6ae2 commit 7d9df65

File tree

6 files changed

+15
-23
lines changed

6 files changed

+15
-23
lines changed

Diff for: build.sbt

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
1-
import Dependencies._
2-
31
ThisBuild / scalaVersion := "2.13.1"
42
ThisBuild / version := "0.1.0-SNAPSHOT"
53
ThisBuild / organization := "com.example"
64
ThisBuild / organizationName := "example"
75

6+
lazy val libs = org.typelevel.libraries
7+
88
lazy val root = (project in file("."))
99
.settings(
1010
name := "Advent Of Code",
1111
scalacOptions ++= Seq(
1212
"deprecation"
1313
),
14-
libraryDependencies ++= Seq(
15-
cats,
16-
catsEffect,
17-
fs2,
18-
monocleCore,
19-
monocleMacro,
20-
scalaTest % Test
21-
),
14+
libs.dependencies("cats-core"),
15+
libs.testDependencies("scalatest"),
2216
scalastyleFailOnWarning := true,
2317
scalastyleFailOnError := true,
2418
wartremoverErrors in (Compile, compile) ++= Warts

Diff for: project/Dependencies.scala

-10
This file was deleted.

Diff for: project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.11")
33
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.11")
44
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
55
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "2.4.5")
6+
addSbtPlugin("org.typelevel" % "sbt-catalysts" % "0.36")

Diff for: src/test/scala/advent/Day1Spec.scala

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ package advent
33
import org.scalatest._
44
import advent.solutions._
55

6-
final class Day1Spec extends FlatSpec with Matchers {
6+
import org.scalatest.flatspec.AnyFlatSpec
7+
import org.scalatest.matchers.should.Matchers
8+
9+
final class Day1Spec extends AnyFlatSpec with Matchers {
710

811
"Part 1" should "have a mass of 2 for a module of mass 12" in {
912
Day1.Part1.fuel(12) should be(2)

Diff for: src/test/scala/advent/Day2Spec.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ package advent
22

33
import org.scalatest._
44
import advent.solutions._
5+
import org.scalatest.flatspec.AnyFlatSpec
6+
import org.scalatest.matchers.should.Matchers
57

6-
final class Day2Spec extends FlatSpec with Matchers {
8+
final class Day2Spec extends AnyFlatSpec with Matchers {
79

810
"Part 1" should "run 1,0,0,0,99 to produce 2,0,0,0,99 (1 + 1 = 2)" in {
911
Day2.Part1.run(List(1, 0, 0, 0, 99)) should be(List(2, 0, 0, 0, 99))

Diff for: src/test/scala/advent/Day3Spec.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import advent.solutions.Day3._
55
import advent.solutions.Day3.Part2._
66
import org.scalatest._
77
import advent.solutions._
8+
import org.scalatest.flatspec.AnyFlatSpec
9+
import org.scalatest.matchers.should.Matchers
810

911
final class Day3Spec
10-
extends FlatSpec
12+
extends AnyFlatSpec
1113
with Matchers
1214
with EitherValues
1315
with OptionValues {

0 commit comments

Comments
 (0)