-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sc
79 lines (67 loc) · 2.17 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
import $ivy.`io.chris-kipp::mill-ci-release::0.1.9`
import $ivy.`ba.sake::mill-hepek::0.0.2`
import mill._, scalalib._, scalajslib._, publish._, scalafmt._
import io.kipp.mill.ci.release.CiReleaseModule
import ba.sake.millhepek.MillHepekModule
object tupson extends Module {
object jvm extends TupsonCommonModule {
object test extends ScalaTests with CommonTestModule
}
object js extends TupsonCommonModule with ScalaJSModule {
def scalaJSVersion = "1.14.0"
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"io.github.cquiroz::scala-java-time::2.5.0"
)
object test extends ScalaJSTests with CommonTestModule
}
trait TupsonCommonModule extends CommonScalaModule with CommonPublishModule with PlatformScalaModule {
def artifactName = "tupson"
def ivyDeps = Agg(
ivy"org.typelevel::jawn-ast::1.5.0"
)
}
}
// jvm-only
object `tupson-config` extends CommonScalaModule with CommonPublishModule {
def moduleDeps = Seq(tupson.jvm)
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"com.typesafe:config:1.4.3"
)
object test extends ScalaTests with CommonTestModule {
def forkArgs = Seq("-Dconfig.override_with_env_vars=true")
def forkEnv = Map("CONFIG_FORCE_envvar_port" -> "1234")
}
}
object examples extends CommonScalaModule {
def moduleDeps = Seq(tupson.jvm)
}
object docs extends CommonScalaModule with MillHepekModule {
def ivyDeps = Agg(
ivy"ba.sake::hepek:0.22.0"
)
}
trait CommonScalaModule extends ScalaModule with ScalafmtModule {
def scalaVersion = "3.3.1"
def scalacOptions = super.scalacOptions() ++ Seq(
"-Yretain-trees", // required for default arguments
"-deprecation",
"-Xcheck-macros"
)
}
trait CommonPublishModule extends CiReleaseModule {
def pomSettings = PomSettings(
organization = "ba.sake",
url = "https://github.com/sake92/tupson",
licenses = Seq(License.Common.Apache2),
versionControl = VersionControl.github("sake92", "tupson"),
description = "Tupson JSON library",
developers = Seq(
Developer("sake92", "Sakib Hadžiavdić", "https://sake.ba")
)
)
}
trait CommonTestModule extends TestModule.Munit {
def ivyDeps = Agg(
ivy"org.scalameta::munit::0.7.29"
)
}