-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.mill
46 lines (38 loc) · 1.22 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
package build
import mill._, scalalib._, scalafmt._
// import $meta._
import $packages._
import $file.{versions => v}
import java.nio.file.Files
import $ivy.`com.goyeau::mill-scalafix::0.4.2`
import com.goyeau.mill.scalafix.ScalafixModule
import mill.scalalib._
def shouldInclude(p: os.Path) = os.isDir(p) && !Files.isHidden(p.wrapped) && p.last != "out"
def moduleNames = interp.watchValue(
os.walk(millSourcePath, !shouldInclude(_), maxDepth = 1)
.map(_.last)
)
object modules extends Cross[NineNineModule](moduleNames)
trait NineNineModule extends ScalaModule with Cross.Module[String] with ScalafmtModule with ScalafixModule {
val scalaVersion = v.scalaVersion
// Ends with 'modules' that need to be removed
def millSourcePath = super.millSourcePath / os.up / crossValue
def scalacOptions: T[Seq[String]] = Seq(
"-encoding", "UTF-8",
"-feature",
"-Werror",
"-explain",
"-deprecation",
"-unchecked",
"-Wunused:all",
"-rewrite",
"-indent",
"-source", "future",
)
object test extends ScalaTests with TestModule.ScalaTest {
def ivyDeps = Agg(
ivy"org.scalatest::scalatest:${v.scalatestVersion}",
ivy"org.scalatestplus::scalacheck-1-18:${v.scalacheckVersion}"
)
}
}