Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei.winitzki committed Nov 22, 2023
1 parent 354fe44 commit 1c90593
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
target
.idea
.bsp
56 changes: 56 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
val scala2V = "2.13.11"
val scala3V = "3.3.1"
val scalaV = scala2V

val munitTest = "org.scalameta" %% "munit" % "0.7.29" % Test
def munitFramework = new TestFramework("munit.Framework")


val assertVerboseTest = "com.eed3si9n.expecty" %% "expecty" % "0.16.0" % Test


lazy val root = (project in file("."))
.settings(scalaVersion := scalaV, crossScalaVersions := Seq(scalaV), name := "sofp-solutions-root")
.aggregate(chapter01, chapter02, common)

lazy val chapter01 = (project in file("chapter01"))
.settings(
scalaVersion := scalaV,
crossScalaVersions := Seq(scala2V, scala3V),
Test / parallelExecution := true,
Test / fork := false,
scalafmtFailOnErrors := false,
testFrameworks += munitFramework,
libraryDependencies ++= Seq(
munitTest,
assertVerboseTest,
),
).dependsOn(common)

lazy val chapter02 = (project in file("chapter02"))
.settings(
scalaVersion := scalaV,
crossScalaVersions := Seq(scala2V, scala3V),
Test / parallelExecution := true,
Test / fork := false,
scalafmtFailOnErrors := false,
testFrameworks += munitFramework,
libraryDependencies ++= Seq(
munitTest,
assertVerboseTest,
),
).dependsOn(common)

lazy val common = (project in file("common"))
.settings(
scalaVersion := scalaV,
crossScalaVersions := Seq(scala2V, scala3V),
Test / parallelExecution := true,
Test / fork := false,
scalafmtFailOnErrors := false,
testFrameworks += munitFramework,
libraryDependencies ++= Seq(
munitTest,
assertVerboseTest,
),
)
13 changes: 13 additions & 0 deletions chapter01/src/test/scala/sofp/unit/Exercise1.1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package sofp.unit

import com.eed3si9n.expecty.Expecty.expect

import munit.FunSuite

class Exercise1_1 extends FunSuite {

test("exercise 1.1") {
expect(1 == 0)
}

}
1 change: 1 addition & 0 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.9.7
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
addDependencyTreePlugin
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

0 comments on commit 1c90593

Please sign in to comment.