-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sc
55 lines (45 loc) · 1.61 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
import mill._
import scalalib._
import scalafmt._
import publish._
object Dependencies {
val scalaVersion = "2.13.14"
val chiselVersion = "6.5.0"
val chisel = ivy"org.chipsalliance::chisel:$chiselVersion"
val chiselPlugin = ivy"org.chipsalliance:::chisel-plugin:$chiselVersion"
val scalaTest = ivy"org.scalatest::scalatest:3.2.19"
}
trait CommonModule extends ScalaModule with ScalafmtModule {
override def scalaVersion = Dependencies.scalaVersion
override def scalacOptions = T {
super.scalacOptions() ++
Agg(
"-deprecation",
"-feature",
"-Xcheckinit",
"-Xfatal-warnings",
"-language:existentials",
"-language:higherKinds",
"-language:reflectiveCalls" // Required by Chisel
)
}
override def ivyDeps = Agg(Dependencies.chisel)
override def scalacPluginIvyDeps = Agg(Dependencies.chiselPlugin)
object test extends ScalaTests with TestModule.ScalaTest {
override def ivyDeps = super.ivyDeps() ++ Agg(Dependencies.scalaTest)
}
}
object chipmunk extends CommonModule with PublishModule {
def publishVersion = "0.1-SNAPSHOT"
def pomSettings = PomSettings(
description = "CHIPMUNK: Enhance CHISEL for Smooth and Comfortable Chip Design",
organization = "com.zhutmost",
url = "https://github.com/zhutmost/chipmunk",
licenses = Seq(License.MIT),
versionControl = VersionControl.github("zhutmost", "chipmunk"),
developers = Seq(Developer("zhutmost", "Haozhe Zhu", "https://github.com/zhutmost"))
)
}
object mylib extends CommonModule {
override def moduleDeps: Seq[ScalaModule] = Seq(chipmunk)
}