forked from sequencer/arithmetic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.sc
77 lines (61 loc) · 2.32 KB
/
common.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
import mill._
import mill.scalalib._
import mill.scalalib.publish._
import coursier.maven.MavenRepository
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4`
import de.tobiasroeser.mill.vcs.version.VcsVersion
trait ArithmeticModule extends ScalaModule with PublishModule {
// SNAPSHOT of Chisel is published to the SONATYPE
override def repositoriesTask = T.task { super.repositoriesTask() ++ Seq(
MavenRepository("https://oss.sonatype.org/content/repositories/snapshots"),
MavenRepository("https://oss.sonatype.org/content/repositories/releases")
) }
// override to build from source, see the usage of chipsalliance/playground
def chisel3Module: Option[PublishModule] = None
// override to build from source, see the usage of chipsalliance/playground
def chisel3PluginJar: T[Option[PathRef]] = T {
None
}
// override to build from source, see the usage of chipsalliance/playground
def chiseltestModule: Option[PublishModule] = None
// Use SNAPSHOT chisel by default, downstream users should override this for their own project versions.
def chisel3IvyDep: T[Option[Dep]] = None
def chisel3PluginIvyDep: T[Option[Dep]] = None
def chiseltestIvyDep: T[Option[Dep]] = None
// dependencies below is not managed by the Chisel team.
def upickle: T[Dep]
def osLib: T[Dep]
def spire: T[Dep]
def evilplot: T[Dep]
def bc: T[Dep]
def utest: T[Dep]
override def moduleDeps = Seq() ++ chisel3Module ++ chiseltestModule
override def scalacPluginClasspath = T {
super.scalacPluginClasspath() ++ chisel3PluginJar()
}
override def scalacPluginIvyDeps = T {
Agg() ++ chisel3PluginIvyDep()
}
override def scalacOptions = T {
super.scalacOptions() ++ chisel3PluginJar().map(path => s"-Xplugin:${path.path}")
}
override def ivyDeps = T {
Agg(
upickle(),
osLib(),
spire(),
evilplot()) ++
chisel3IvyDep()
}
def publishVersion = de.tobiasroeser.mill.vcs.version.VcsVersion.vcsState().format()
def pomSettings = PomSettings(
description = artifactName(),
organization = "me.jiuyang",
url = "https://jiuyang.me",
licenses = Seq(License.`Apache-2.0`),
versionControl = VersionControl.github("sequencer", "arithmetic"),
developers = Seq(
Developer("sequencer", "Jiuyang Liu", "https://jiuyang.me/")
)
)
}