-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sc
128 lines (96 loc) · 2.9 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
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
import mill._
import mill.scalalib._
import mill.scalalib.publish._
object Version {
val scala212 = "2.12.18"
val scala213 = "2.13.13"
val scalaCross = Seq(scala212, scala213)
val cats = "2.10.0"
val catsEffect = "3.5.4"
val zio = "2.0.22"
val zioInteropCats = "23.1.0.2"
val graalvm = "23.1.1"
}
object Library {
val catsCore = ivy"org.typelevel::cats-core::${Version.cats}"
val catsEffectStd = ivy"org.typelevel::cats-effect-std::${Version.catsEffect}"
// example/
val catsEffect = ivy"org.typelevel::cats-effect::${Version.catsEffect}"
// example/zio
val zio = ivy"dev.zio::zio::${Version.zio}"
val zioInteropCats = ivy"dev.zio::zio-interop-cats::${Version.zioInteropCats}"
// graalvm
val graalvmPolyglot = ivy"org.graalvm.polyglot:polyglot:${Version.graalvm}"
val graalvmJs = ivy"org.graalvm.polyglot:js-community:${Version.graalvm}"
// tests
val weaverCats = ivy"com.disneystreaming::weaver-cats::0.8.4"
}
trait BaseModule extends CrossScalaModule {
override def scalacOptions = Seq(
"-unchecked",
"-deprecation",
"-language:_",
"-encoding",
"UTF-8",
"-feature",
"-unchecked",
"-Xlint:_",
"-Wconf:cat=lint-byname-implicit:s",
"-Ywarn-dead-code"
)
}
object urlopt4s extends Cross[UrlOpt4sModule](Version.scalaCross)
trait UrlOpt4sModule extends BaseModule with PublishModule {
override def publishVersion: T[String] = "0.2.0"
override def pomSettings = PomSettings(
description =
"Allows you to remove ad/tracking query params from a given URL.",
organization = "me.seroperson",
url = "https://github.com/seroperson/urlopt4s",
licenses = Seq(License.Common.MIT),
versionControl = VersionControl.github("seroperson", "urlopt4s"),
developers = Seq(
Developer(
"seroperson",
"Daniil Sivak",
"https://seroperson.me/"
)
)
)
override def ivyDeps = T {
super.ivyDeps() ++
Agg(
Library.catsCore,
Library.catsEffectStd,
Library.graalvmPolyglot,
Library.graalvmJs
)
}
object test extends ScalaTests with TestModule.ScalaTest {
override def ivyDeps = T {
super.ivyDeps() ++ Agg(Library.weaverCats, Library.catsEffect)
}
override def testFramework = "weaver.framework.CatsEffect"
}
}
object example extends Module {
object cats extends Cross[CatsModule](Version.scalaCross)
trait CatsModule extends BaseModule {
override def ivyDeps = T {
super.ivyDeps() ++ Agg(Library.catsEffect)
}
override def moduleDeps = super.moduleDeps ++ Seq(urlopt4s())
}
object zio extends Cross[ZioModule](Version.scalaCross)
trait ZioModule extends BaseModule {
override def ivyDeps = T {
super.ivyDeps() ++
Agg(
Library.zio,
Library.zioInteropCats,
Library.catsEffect
)
}
override def moduleDeps = super.moduleDeps ++ Seq(urlopt4s())
}
}