-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.mill
131 lines (96 loc) · 3.83 KB
/
build.mill
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
129
130
131
import os.copy.over
import $ivy.`io.github.quafadas::millSite::0.0.24`
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
import $ivy.`com.goyeau::mill-scalafix::0.4.0`
import $file.playwrightVersion // used to cache in GHA
import io.github.quafadas.millSite._
import mill._, scalalib._, publish._, scalanativelib._
import mill.scalalib.scalafmt.ScalafmtModule
import de.tobiasroeser.mill.vcs.version._
import com.goyeau.mill.scalafix.ScalafixModule
import java.text.Format
object V{
val http4sVersion = "0.23.30"
val circeVersion = "0.14.10"
}
trait FormatFix extends ScalafmtModule with ScalafixModule with ScalaModule
trait FormatFixPublish extends ScalaModule with FormatFix with PublishModule{
override def scalaVersion = "3.6.2"
override def scalacOptions: Target[Seq[String]] = super.scalacOptions() ++ Seq("-Wunused:all")
def publishVersion = VcsVersion.vcsState().format()
override def pomSettings = T {
PomSettings(
description = "An experimental live server for scala JS projects",
organization = "io.github.quafadas",
url = "https://github.com/Quafadas/live-server-scala-cli-js",
licenses = Seq(License.`Apache-2.0`),
versionControl =
VersionControl.github("quafadas", "live-server-scala-cli-js"),
developers = Seq(
Developer("quafadas", "Simon Parten", "https://github.com/quafadas")
)
)
}
}
trait Testy extends TestModule.Munit with FormatFix {
override def defaultCommandName(): String = "test"
def ivyDeps = super.ivyDeps() ++ sjsls.ivyDeps() ++ Seq(
ivy"org.typelevel::munit-cats-effect::2.0.0",
ivy"org.scalameta::munit::1.1.0",
ivy"com.lihaoyi::os-lib:0.11.4"
)
}
object routes extends FormatFixPublish {
def scalaVersion: T[String] = "3.3.5" // Latest LTS
def ivyDeps = Agg(
ivy"org.http4s::http4s-core:${V.http4sVersion}",
ivy"org.http4s::http4s-client:${V.http4sVersion}",
ivy"org.http4s::http4s-server:${V.http4sVersion}",
ivy"org.http4s::http4s-dsl::${V.http4sVersion}",
ivy"com.outr::scribe-cats::3.15.0"
)
override def artifactName = "frontend-routes"
object test extends Testy with ScalaTests{
def ivyDeps = super.ivyDeps() ++ sjsls.ivyDeps()
}
}
object sjsls extends FormatFixPublish {
override def scalaVersion = "3.3.3" // Latest LTSs
def ivyDeps = super.ivyDeps() ++ Seq(
ivy"org.http4s::http4s-ember-server::${V.http4sVersion}",
ivy"org.http4s::http4s-ember-client::${V.http4sVersion}",
ivy"org.http4s::http4s-scalatags::0.25.2",
ivy"io.circe::circe-core::${V.circeVersion}",
ivy"io.circe::circe-generic::${V.circeVersion}",
ivy"co.fs2::fs2-io::3.11.0",
ivy"com.lihaoyi::scalatags::0.13.1",
ivy"com.monovore::decline::2.5.0",
ivy"com.monovore::decline-effect::2.5.0",
)
def moduleDeps = Seq(routes)
def artifactName = "sjsls"
object test extends Testy with ScalaTests {
def ivyDeps = super.ivyDeps() ++ sjsls.ivyDeps() ++ Seq(
ivy"com.microsoft.playwright:playwright:${playwrightVersion.pwV}",
ivy"com.microsoft.playwright:driver-bundle:${playwrightVersion.pwV}"
)
}
//def scalaNativeVersion = "0.4.17" // aspirational :-)
}
object site extends SiteModule {
def scalaVersion = sjsls.scalaVersion
override def moduleDeps = Seq(sjsls)
}
// SN deps which aren't yet there.
/**
1 targets failed
project.resolvedIvyDeps
Resolution failed for 2 modules:
--------------------------------------------
com.outr:scribe-cats_native0.4_3:3.13.5
not found: /Users/simon/.ivy2/local/com.outr/scribe-cats_native0.4_3/3.13.5/ivys/ivy.xml
not found: https://repo1.maven.org/maven2/com/outr/scribe-cats_native0.4_3/3.13.5/scribe-cats_native0.4_3-3.13.5.pom
--------------------------------------------
For additional information on library dependencies, see the docs at
https://mill-build.com/mill/Library_Dependencies.html
**/