-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathbuild.sbt
99 lines (89 loc) · 2.69 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
import sbtcrossproject.CrossPlugin.autoImport.crossProject
lazy val scalatest = Def.setting("org.scalatest" %%% "scalatest" % "3.2.19")
lazy val specs2 = Def.setting("org.specs2" %%% "specs2-core" % "4.20.8")
val commonSettings = Defaults.coreDefaultSettings ++ Seq(
scalaVersion := "3.4.3",
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-feature",
"-experimental"
)
)
lazy val root = project.in(file("."))
.settings(
publish / skip := true
)
.aggregate(
scalamock.jvm,
scalamock.js,
`scalamock-zio`.jvm,
`scalamock-zio`.js,
`scalamock-cats-effect`.jvm,
`scalamock-cats-effect`.js
)
lazy val scalamock = crossProject(JSPlatform, JVMPlatform)
.in(file("core"))
.settings(
commonSettings,
name := "scalamock",
Compile / doc / scalacOptions ++= Opts.doc.title("ScalaMock") ++
Opts.doc.version(version.value) ++ Seq("-doc-root-content", "rootdoc.txt", "-version"),
libraryDependencies ++= Seq(
scalatest.value % Optional,
specs2.value % Optional
),
)
lazy val `scalamock-zio` = crossProject(JSPlatform, JVMPlatform)
.in(file("zio"))
.settings(
name := "scalamock-zio",
commonSettings,
libraryDependencies ++= {
val zioVersion = "2.1.14"
Seq(
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-test" % zioVersion % Test,
"dev.zio" %%% "zio-test-sbt" % zioVersion % Test
)
}
)
.jsSettings(name := "scalamock-zio")
.jvmSettings(name := "scalamock-zio")
.dependsOn(scalamock)
lazy val `scalamock-cats-effect` = crossProject(JSPlatform, JVMPlatform)
.in(file("cats-effect"))
.settings(
name := "scalamock-cats-effect",
commonSettings,
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % "3.5.7",
"org.typelevel" %% "munit-cats-effect" % "2.0.0" % Test
)
)
.jsSettings(name := "scalamock-cats-effect")
.jvmSettings(name := "scalamock-cats-effect")
.dependsOn(scalamock)
lazy val examples = project in file("core/examples") settings(
commonSettings,
name := "ScalaMock Examples",
publish / skip := true,
libraryDependencies ++= Seq(
scalatest.value % Test,
specs2.value % Test
)
) dependsOn scalamock.jvm
inThisBuild(
List(
organization := "org.scalamock",
homepage := Some(url("http://scalamock.org/")),
licenses := List(
"MIT" -> url("https://opensource.org/licenses/MIT")
),
developers := List(
Developer("paulbutcher", "Paul Butcher", "", url("http://paulbutcher.com/")),
Developer("barkhorn", "Philipp Meyerhoefer", "", url("https://github.com/barkhorn")),
Developer("goshacodes", "Georgii Kovalev", "", url("https://github.com/goshacodes"))
)
)
)