Refine build.sbt. ignore no use middle files of scala.

This commit is contained in:
colin 2022-03-26 17:51:42 +00:00
parent d61bc07515
commit 5721e092bb
5 changed files with 45 additions and 49 deletions

7
.gitignore vendored
View File

@ -1,17 +1,12 @@
.metals/
.vscode/
# design/project/target/
# design/project/project/
design/project/
design/.idea/
design/target/streams/
design/target/.history
design/target/scala-2.12/
-design/target/scala-2.12/classes/wrapper*
design/target/
generated_rtl/*.sv
verif/sim/*.log

View File

@ -1,56 +1,57 @@
// See README.md for license details.
// ThisBuild / scalaVersion := "2.13.8"
// ThisBuild / version := "3.3.0"
// ThisBuild / organization := "COLIN"
def scalacOptionsVersion(scalaVersion: String): Seq[String] = {
Seq() ++ {
// If we're building with Scala > 2.11, enable the compile option
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, scalaMajor: Long)) if scalaMajor < 12 => Seq()
case _ => Seq("-Xsource:2.11")
}
}
}
// mainClass in (Compile, run) := Some("QUASAR_Wrp")
def javacOptionsVersion(scalaVersion: String): Seq[String] = {
Seq() ++ {
// Scala 2.12 requires Java 8. We continue to generate
// Java 7 compatible code for Scala 2.11
// for compatibility with old clients.
CrossVersion.partialVersion(scalaVersion) match {
case Some((2, scalaMajor: Long)) if scalaMajor < 12 =>
Seq("-source", "1.7", "-target", "1.7")
case _ =>
Seq("-source", "1.8", "-target", "1.8")
}
}
}
// resolvers ++= Seq(
// Resolver.sonatypeRepo("snapshots"),
// Resolver.sonatypeRepo("releases")
// )
name := "QUASAR"
// val chiselVersion = "3.5.2"
version := "3.3.0"
// lazy val root = (project in file("."))
// .settings(
// name := "QUASAR",
// libraryDependencies ++= Seq(
// "edu.berkeley.cs" %% "chisel3" % chiselVersion,
// "edu.berkeley.cs" %% "chisel-iotesters" % "2.5.2",
// "edu.berkeley.cs" %% "chiseltest" % "0.5.2"
// ),
// scalacOptions ++= Seq(
// "-language:reflectiveCalls",
// "-deprecation",
// "-feature",
// "-Xcheckinit",
// "-P:chiselplugin:genBundleElements",
// "-Ymacro-annotations",
// ),
// addCompilerPlugin("edu.berkeley.cs" % "chisel3-plugin" % chiselVersion cross CrossVersion.full),
// )
scalaVersion := "2.12.10"
ThisBuild / scalaVersion := "2.12.10"
ThisBuild / version := "3.3.0"
ThisBuild / organization := "COLIN"
// Making the main-class
mainClass in (Compile, run) := Some("wrapper")
crossScalaVersions := Seq("2.12.10", "2.11.12")
mainClass in (Compile, run) := Some("QUASAR_Wrp")
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.sonatypeRepo("releases")
)
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
// Provide a managed dependency on X if -DXVersion="" is supplied on the command line.
val defaultVersions = Seq(
"chisel-iotesters" -> "1.4.1+",
"chiseltest" -> "0.2.1+"
lazy val root = (project in file("."))
.settings(
name := "QUASAR",
libraryDependencies ++= Seq(
"edu.berkeley.cs" %% "chisel-iotesters" % "1.4.1",
"edu.berkeley.cs" %% "chiseltest" % "0.2.1+"
),
scalacOptions ++= Seq(
"-Xsource:2.11"
),
addCompilerPlugin(
"org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full
)
)
libraryDependencies ++= defaultVersions.map { case (dep, ver) =>
"edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", ver) }
scalacOptions ++= scalacOptionsVersion(scalaVersion.value)
javacOptions ++= javacOptionsVersion(scalaVersion.value)