-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.mill
66 lines (55 loc) · 2.04 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
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2022 Jiuyang Liu <[email protected]>
package build
import mill._
import mill.scalalib._, publish._
import mill.scalalib.scalafmt._
object v {
val scala = "2.13.15"
val scalajs = "1.14.0"
object jvm {
val oslib = ivy"com.lihaoyi::os-lib:0.9.1"
val upickle = ivy"com.lihaoyi::upickle:3.3.1"
}
object js {
val upickle = ivy"com.lihaoyi::upickle::3.3.1"
}
}
trait RVDecoderDBJVMModule extends common.RVDecoderDBJVMModule with PublishModule with ScalafmtModule {
override def allSources: T[Seq[PathRef]] = T(Seq(PathRef(millSourcePath / os.up / "src"), PathRef(millSourcePath / os.up / "jvm" / "src")))
def scalaVersion = T(v.scala)
def osLibIvy = v.jvm.oslib
def upickleIvy= v.jvm.upickle
def publishVersion = "0.0.0+0-no-vcs-SNAPSHOT"
def pomSettings = PomSettings (
description = "rvdecoderdb",
organization = "me.jiuyang",
url = "https://github.com/sequencer/rvdecoderdb",
licenses = Seq(License.MIT),
versionControl = VersionControl.github("sequencer", "rvdecoderdb"),
developers = Seq(Developer("sequencer", "Liu Jiuyang", "https://github.com/sequencer"))
)
}
trait RVDecoderDBJSModule extends common.RVDecoderDBJSModule with ScalafmtModule {
def scalaVersion = T(v.scala)
def scalaJSVersion = T(v.scalajs)
def upickleIvy = v.js.upickle
}
object rvdecoderdb extends Module { m =>
object jvm extends RVDecoderDBJVMModule
object js extends RVDecoderDBJSModule
}
trait RVDecoderDBJVMTestModule extends common.RVDecoderDBJVMTestModule with ScalafmtModule {
def dut = rvdecoderdb.jvm
def riscvOpcodesPath: T[Option[PathRef]] = T.input(Some(PathRef(millSourcePath / "riscv-opcodes")))
def scalaVersion = T(v.scala)
}
trait RVDecoderDBJSTestModule extends common.RVDecoderDBTestJSModule with ScalafmtModule {
def dut = rvdecoderdb.js
def scalaVersion = T(v.scala)
def scalaJSVersion = T(v.scalajs)
}
object rvdecoderdbtest extends Module { m =>
object jvm extends RVDecoderDBJVMTestModule
object js extends RVDecoderDBJSTestModule
}