Make rocket publish a single jar.

This puts macros + hardfloat in a single jar instead of being published
as separate jars.
This commit is contained in:
Paul Rigge 2019-03-12 20:41:52 -07:00
parent 79e58d4faa
commit 0f0798a374
No known key found for this signature in database
GPG Key ID: B704BE53AC933856
1 changed files with 14 additions and 2 deletions

View File

@ -64,11 +64,23 @@ def dependOnChisel(prj: Project) = {
lazy val hardfloat = dependOnChisel(project).settings(commonSettings)
.settings(crossScalaVersions := Seq("2.12.4"))
.settings(publishArtifact := false)
lazy val `rocket-macros` = (project in file("macros")).settings(commonSettings)
.settings(publishArtifact := false)
lazy val rocketchip = dependOnChisel(project in file("."))
.settings(commonSettings, chipSettings)
.dependsOn(hardfloat, `rocket-macros`)
.aggregate(hardfloat, `rocket-macros`) // <-- means the running task on rocketchip is also run by aggregate tasks
.dependsOn(hardfloat % "compile-internal;test-internal")
.dependsOn(`rocket-macros` % "compile-internal;test-internal")
.settings(
aggregate := false,
// Include macro classes, resources, and sources in main jar.
mappings in (Compile, packageBin) ++= (mappings in (hardfloat, Compile, packageBin)).value,
mappings in (Compile, packageSrc) ++= (mappings in (hardfloat, Compile, packageSrc)).value,
mappings in (Compile, packageBin) ++= (mappings in (`rocket-macros`, Compile, packageBin)).value,
mappings in (Compile, packageSrc) ++= (mappings in (`rocket-macros`, Compile, packageSrc)).value,
exportJars := true
)
lazy val addons = settingKey[Seq[String]]("list of addons used for this build")
lazy val make = inputKey[Unit]("trigger backend-specific makefile command")