forked from carlosedp/chiselv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
67 lines (58 loc) · 2.67 KB
/
build.sbt
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
// See README.md for license details.
ThisBuild / organization := "com.carlosedp"
ThisBuild / description := "ChiselV is a RISC-V core written in Chisel"
ThisBuild / homepage := Some(url("https://carlosedp.com"))
ThisBuild / licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT"))
ThisBuild / scmInfo := Some(
ScmInfo(url("https://github.com/carlosedp/chiselv"), "[email protected]:carlosedp/chiselv.git")
)
ThisBuild / developers := List(
Developer("carlosedp", "Carlos Eduardo de Paula", "[email protected]", url("https://github.com/carlosedp"))
)
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0"
Global / semanticdbEnabled := true
Global / semanticdbVersion := "4.4.28" //scalafixSemanticdb.revision // Force version due to compatibility issues
Global / onChangedBuildSource := ReloadOnSourceChanges
Compile / run / mainClass := Some("chiselv.Toplevel")
lazy val chiselv = (project in file("."))
.settings(
name := "chiselv",
version := "0.0.1",
scalaVersion := "2.13.6",
)
// Default library versions
val defaultVersions = Map(
"chisel3" -> "3.5.0-RC1",
"chiseltest" -> "0.5-SNAPSHOT",
"scalatest" -> "3.2.10",
"organize-imports" -> "0.5.0",
"scalautils" -> "0.5.0",
)
// Import libraries
libraryDependencies += "edu.berkeley.cs" %% "chisel3" % defaultVersions("chisel3")
libraryDependencies += ("edu.berkeley.cs" %% "chiseltest" % defaultVersions("chiseltest") % "test").changing()
libraryDependencies += "org.scalatest" %% "scalatest" % defaultVersions("scalatest") % "test"
libraryDependencies += "com.carlosedp" %% "scalautils" % defaultVersions("scalautils")
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % defaultVersions("organize-imports")
addCompilerPlugin(("edu.berkeley.cs" % "chisel3-plugin" % defaultVersions("chisel3")).cross(CrossVersion.full))
// Aliases
addCommandAlias("com", "all compile test:compile")
addCommandAlias("rel", "reload")
addCommandAlias("fmt", "all scalafmtSbt scalafmtAll;all Compile / scalafix; Test / scalafix")
addCommandAlias("fix", "all Compile / scalafixAll; Test / scalafixAll")
addCommandAlias("lint", "fmt;fix")
addCommandAlias("deps", "dependencyUpdates")
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.sonatypeRepo("releases"),
)
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-language:reflectiveCalls",
"-feature",
"-Xcheckinit",
"-Xfatal-warnings",
"-Ywarn-dead-code",
"-Ywarn-unused",
)