-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sc
104 lines (76 loc) · 2.6 KB
/
build.sc
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
import $ivy.`com.lihaoyi::mill-contrib-scoverage:$MILL_VERSION`
import mill._
import mill.api.Loose
import mill.define.Target
import scalalib._
import mill.contrib.scoverage.ScoverageModule
object Deps {
def scalaReflect(scalaVersion: String) = ivy"org.scala-lang:scala-reflect:${scalaVersion}"
val utest = ivy"com.lihaoyi::utest::0.7.4"
val mockito = ivy"org.mockito::mockito-scala:1.14.8"
}
object poc extends ScalaModule with ScoverageModule {
override def scalaVersion = "2.13.3"
override def scoverageVersion = "1.4.1"
override def ivyDeps: Target[Loose.Agg[Dep]] = Agg(
ivy"com.github.javaparser:javaparser-core:3.16.1",
ivy"org.jacoco:org.jacoco.core:0.8.5",
ivy"org.jacoco:org.jacoco.report:0.8.5",
ivy"com.lihaoyi::upickle:1.1.0",
ivy"org.scala-lang.modules::scala-async:0.10.0",
ivy"com.lihaoyi::os-lib:0.7.0",
Deps.scalaReflect(scalaVersion()),
)
trait utest extends ScoverageTests {
def testFrameworks = Seq("utest.runner.Framework")
override def moduleDeps: Seq[JavaModule] = super.moduleDeps ++ Seq(poc)
override def ivyDeps = Agg(
Deps.utest,
Deps.mockito,
)
}
object test extends utest
object integration extends utest
object github extends ScoverageModule {
override def moduleDeps: Seq[JavaModule] = Seq(poc)
override def scoverageVersion = "1.4.1"
override def scalaVersion = poc.scalaVersion
override def ivyDeps: Target[Loose.Agg[Dep]] = Agg(
ivy"com.lihaoyi::requests:0.6.2",
ivy"org.scala-lang.modules::scala-async:0.10.0",
Deps.scalaReflect(scalaVersion()),
)
object test extends ScoverageTests {
def testFrameworks = Seq("utest.runner.Framework")
override def ivyDeps = Agg(
Deps.utest,
Deps.mockito,
)
}
}
object mongodb extends ScalaModule {
override def scalaVersion = poc.scalaVersion
override def ivyDeps: Target[Loose.Agg[Dep]] = Agg(
ivy"com.lihaoyi::upickle:1.1.0",
ivy"org.scala-lang.modules::scala-async:0.10.0",
Deps.scalaReflect(scalaVersion()),
)
}
}
object example extends ScalaModule {
override def scalaVersion = poc.scalaVersion
override def moduleDeps: Seq[JavaModule] = Seq(poc, poc.github)
override def ivyDeps: Target[Loose.Agg[Dep]] = Agg(
ivy"com.lihaoyi::cask:0.6.7",
ivy"com.lihaoyi::upickle:1.1.0",
ivy"org.scala-lang.modules::scala-async:0.10.0",
ivy"com.lihaoyi::os-lib:0.7.0",
Deps.scalaReflect(scalaVersion()),
)
object test extends Tests {
def testFrameworks = Seq("utest.runner.Framework")
override def ivyDeps = Agg(
Deps.utest,
)
}
}