forked from typelevel/cats-mtl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
119 lines (97 loc) · 3.9 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
// project info
organization in ThisBuild := "org.typelevel"
// aliases
addCommandAlias("buildJVM", "catsMtlJVM/test")
addCommandAlias("validateJVM", ";scalastyle;scalafmt::test;test:scalafmt::test;buildJVM;mimaReportBinaryIssues;makeMicrosite")
addCommandAlias("validateJS", ";catsMtlJS/compile;testsJS/test;js/test")
addCommandAlias("validate", ";clean;validateJS;validateJVM")
sbtPlugin := true
publishMavenStyle := false
// projects
val core = crossProject.crossType(CrossType.Pure)
.settings(moduleName := "cats-mtl-core", name := "Cats MTL core")
.settings(Settings.coreSettings:_*)
.settings(Settings.includeGeneratedSrc)
.settings(Dependencies.acyclic)
.settings(Dependencies.catsCore)
.settings(Dependencies.scalaCheck)
.configureCross(Coverage.disableScoverage210Jvm)
.configureCross(Coverage.disableScoverage210Js)
.jsSettings(Settings.commonJsSettings:_*)
.jvmSettings(Settings.commonJvmSettings:_*)
val coreJVM = core.jvm
val coreJS = core.js
val docs = project
.enablePlugins(MicrositesPlugin)
.enablePlugins(ScalaUnidocPlugin)
.settings(moduleName := "cats-mtl-docs")
.settings(Settings.coreSettings)
.settings(Publishing.noPublishSettings)
.settings(ghpages.settings)
.settings(Docs.docSettings)
.settings(tutScalacOptions ~= (_.filterNot(Set("-Ywarn-unused-import", "-Ywarn-dead-code"))))
.settings(Settings.commonJvmSettings)
.dependsOn(coreJVM)
val laws = crossProject.crossType(CrossType.Pure)
.dependsOn(core)
.settings(moduleName := "cats-mtl-laws", name := "Cats MTL laws")
.settings(Settings.coreSettings:_*)
.settings(Dependencies.catsBundle:_*)
.settings(Dependencies.discipline:_*)
.configureCross(Coverage.disableScoverage210Jvm)
.settings(Dependencies.catalystsAndScalatest: _*)
.jsSettings(Settings.commonJsSettings:_*)
.jvmSettings(Settings.commonJvmSettings:_*)
.jsSettings(coverageEnabled := false)
val lawsJVM = laws.jvm
val lawsJS = laws.js
val tests = crossProject.crossType(CrossType.Pure)
.dependsOn(core, laws)
.settings(moduleName := "cats-mtl-tests")
.settings(Settings.coreSettings:_*)
.settings(Dependencies.catsBundle:_*)
.settings(Dependencies.discipline:_*)
.settings(Dependencies.scalaCheck:_*)
.settings(Publishing.noPublishSettings:_*)
.settings(Dependencies.catalystsAndScalatest:_*)
.jsSettings(Settings.commonJsSettings:_*)
.jvmSettings(Settings.commonJvmSettings:_*)
val testsJVM = tests.jvm
val testsJS = tests.js
// cats-mtl-js is JS-only
val js = project
.dependsOn(coreJS, testsJS % "test-internal -> test")
.settings(moduleName := "cats-mtl-js")
.settings(Settings.coreSettings:_*)
.settings(Settings.commonJsSettings:_*)
.settings(Publishing.noPublishSettings)
.configure(Coverage.disableScoverage210Js)
.enablePlugins(ScalaJSPlugin)
// cats-mtl-jvm is JVM-only
val jvm = project
.dependsOn(coreJVM, testsJVM % "test-internal -> test")
.settings(moduleName := "cats-mtl-jvm")
.settings(Settings.coreSettings:_*)
.settings(Settings.commonJvmSettings:_*)
.settings(Publishing.noPublishSettings)
val catsMtlJVM = project.in(file(".catsJVM"))
.settings(moduleName := "cats-mtl")
.settings(Settings.coreSettings)
.settings(Settings.commonJvmSettings)
.settings(Publishing.noPublishSettings)
.aggregate(coreJVM, lawsJVM, testsJVM, jvm, docs)
.dependsOn(coreJVM, lawsJVM, testsJVM % "test-internal -> test", jvm)
val catsMtlJS = project.in(file(".catsJS"))
.settings(moduleName := "cats-mtl")
.settings(Settings.coreSettings)
.settings(Settings.commonJsSettings)
.settings(Publishing.noPublishSettings)
.aggregate(coreJS, lawsJS, testsJS, js)
.dependsOn(coreJS, lawsJS, testsJS % "test-internal -> test", js)
.enablePlugins(ScalaJSPlugin)
val catsMtl = project.in(file("."))
.settings(moduleName := "root")
.settings(Settings.coreSettings)
.settings(Publishing.noPublishSettings)
.aggregate(catsMtlJVM, catsMtlJS)
.dependsOn(catsMtlJVM, catsMtlJS, testsJVM % "test-internal -> test")