-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sc
46 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
// import Mill dependency
import mill._
import mill.define.Sources
import mill.modules.Util
import mill.scalalib.scalafmt.ScalafmtModule
import mill.scalalib.TestModule.ScalaTest
import mill.scalalib._
// support BSP
import mill.bsp._
object playground extends SbtModule with ScalafmtModule { m =>
val useChisel3 = false
override def millSourcePath = os.pwd / "src"
override def scalaVersion = "2.13.12"
override def scalacOptions = Seq(
"-language:reflectiveCalls",
"-deprecation",
"-feature",
"-Xcheckinit"
)
override def sources = T.sources {
super.sources() ++ Seq(PathRef(millSourcePath / "main"))
}
override def ivyDeps = Agg(
if (useChisel3) ivy"edu.berkeley.cs::chisel3:3.6.0" else
ivy"org.chipsalliance::chisel:7.0.0-M1"
)
override def scalacPluginIvyDeps = Agg(
if (useChisel3) ivy"edu.berkeley.cs:::chisel3-plugin:3.6.0" else
ivy"org.chipsalliance:::chisel-plugin:7.0.0-M1"
)
object test extends SbtModuleTests with TestModule.ScalaTest with ScalafmtModule {
override def sources = T.sources {
super.sources() ++ Seq(PathRef(millSourcePath / "test"))
}
override def ivyDeps = super.ivyDeps() ++ Agg(
if (useChisel3) ivy"edu.berkeley.cs::chiseltest:0.6.0" else
ivy"edu.berkeley.cs::chiseltest:6.0.0"
)
}
def repositoriesTask = T.task { Seq(
coursier.MavenRepository("https://repo.scala-sbt.org/scalasbt/maven-releases"),
coursier.MavenRepository("https://oss.sonatype.org/content/repositories/releases"),
coursier.MavenRepository("https://oss.sonatype.org/content/repositories/snapshots"),
) ++ super.repositoriesTask() }
}