forked from scoverage/sbt-scoverage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
40 lines (35 loc) · 891 Bytes
/
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
/*
The projects test aggregation of coverage reports from two sub-projects.
The sub-projects are in the directories partA and partB.
*/
lazy val commonSettings = Seq(
organization := "org.scoverage",
version := "0.1.0",
scalaVersion := "2.13.13"
)
def module(name: String) = {
val id = s"part$name"
Project(id = id, base = file(id))
.settings(commonSettings: _*)
.settings(
Keys.name := name,
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test
)
}
lazy val partA = module("A")
lazy val partB = module("B")
lazy val root = (project in file("."))
.settings(commonSettings: _*)
.settings(
name := "root",
test := {}
)
.aggregate(
partA,
partB
)
ThisBuild / resolvers ++= {
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT")))
Seq(Resolver.sonatypeRepo("snapshots"))
else Seq.empty
}