This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
134 lines (126 loc) · 5.16 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / organization := "codes.quine.labo"
ThisBuild / scalaVersion := "2.13.4"
ThisBuild / scalacOptions ++= Seq(
"-encoding",
"UTF-8",
"-feature",
"-deprecation",
"-Wunused"
)
// Scalafix config:
ThisBuild / scalafixScalaBinaryVersion := "2.13"
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0"
ThisBuild / scalafixDependencies += "com.github.vovapolu" %% "scaluzzi" % "0.1.18"
lazy val root = project
.in(file("."))
.aggregate(core, cats, shapeless, laws)
lazy val core = project
.in(file("modules/uchu-core"))
.settings(
name := "uchu-core",
console / initialCommands := """
|import codes.quine.labo.uchu._
|import codes.quine.labo.uchu.Card._
|""".stripMargin,
Compile / console / scalacOptions -= "-Wunused",
Test / console / scalacOptions -= "-Wunused",
// Set URL mapping of scala standard API for Scaladoc.
apiMappings ++= scalaInstance.value.libraryJars
.filter(file => file.getName.startsWith("scala-library") && file.getName.endsWith(".jar"))
.map(_ -> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"))
.toMap,
// Settings for test:
libraryDependencies += "org.scalameta" %% "munit" % "0.7.26" % Test,
testFrameworks += new TestFramework("munit.Framework"),
doctestTestFramework := DoctestTestFramework.Munit,
doctestMarkdownEnabled := true
)
lazy val cats = project
.in(file("modules/uchu-cats"))
.settings(
name := "uchu-cats",
console / initialCommands := """
|import cats._
|import cats.data._
|
|import codes.quine.labo.uchu._
|import codes.quine.labo.uchu.Card._
|import codes.quine.labo.uchu.cats._
|import codes.quine.labo.uchu.cats.instances._
|""".stripMargin,
Compile / console / scalacOptions -= "-Wunused",
Test / console / scalacOptions -= "-Wunused",
// Set URL mapping of scala standard API for Scaladoc.
apiMappings ++= scalaInstance.value.libraryJars
.filter(file => file.getName.startsWith("scala-library") && file.getName.endsWith(".jar"))
.map(_ -> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"))
.toMap,
// Dependencies:
libraryDependencies += "org.typelevel" %% "cats-core" % "2.6.1",
// Settings for test:
libraryDependencies += "org.scalameta" %% "munit" % "0.7.26" % Test,
testFrameworks += new TestFramework("munit.Framework"),
doctestTestFramework := DoctestTestFramework.Munit,
doctestMarkdownEnabled := true
)
.dependsOn(core)
lazy val shapeless = project
.in(file("modules/uchu-shapeless"))
.settings(
name := "uchu-shapeless",
console / initialCommands := """
|import shapeless._
|
|import codes.quine.labo.uchu._
|import codes.quine.labo.uchu.Card._
|import codes.quine.labo.uchu.shapeless._
|""".stripMargin,
Compile / console / scalacOptions -= "-Wunused",
Test / console / scalacOptions -= "-Wunused",
// Set URL mapping of scala standard API for Scaladoc.
apiMappings ++= scalaInstance.value.libraryJars
.filter(file => file.getName.startsWith("scala-library") && file.getName.endsWith(".jar"))
.map(_ -> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"))
.toMap,
// Dependencies:
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.7",
// Settings for test:
libraryDependencies += "org.scalameta" %% "munit" % "0.7.26" % Test,
testFrameworks += new TestFramework("munit.Framework"),
doctestTestFramework := DoctestTestFramework.Munit,
doctestMarkdownEnabled := true
)
.dependsOn(core)
lazy val laws = project
.in(file("modules/uchu-laws"))
.settings(
name := "uchu-laws",
console / initialCommands := """
|import codes.quine.labo.uchu._
|import codes.quine.labo.uchu.Card._
|import codes.quine.labo.uchu.laws._
|""".stripMargin,
Compile / console / scalacOptions -= "-Wunused",
Test / console / scalacOptions -= "-Wunused",
// Set URL mapping of scala standard API for Scaladoc.
apiMappings ++= scalaInstance.value.libraryJars
.filter(file => file.getName.startsWith("scala-library") && file.getName.endsWith(".jar"))
.map(_ -> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"))
.toMap,
// Dependencies:
libraryDependencies += "org.typelevel" %% "cats-kernel" % "2.6.1",
libraryDependencies += "org.typelevel" %% "discipline-core" % "1.1.5",
// Settings for test:
libraryDependencies += "org.scalameta" %% "munit" % "0.7.26" % Test,
libraryDependencies += "org.scalameta" %% "munit" % "0.7.25" % Test,
libraryDependencies += "org.typelevel" %% "discipline-munit" % "1.0.9" % Test,
libraryDependencies += "org.typelevel" %% "cats-laws" % "2.6.1" % Test,
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.7" % Test,
testFrameworks += new TestFramework("munit.Framework"),
doctestTestFramework := DoctestTestFramework.Munit,
doctestMarkdownEnabled := true
)
.dependsOn(core, cats, shapeless % Test)