Skip to content

Commit 7af4163

Browse files
authored
Generate aggregate coverage but publish a single Jar (#695)
* Generate aggregate coverage but publish a single Jar * Reduce the aggressive dis-aggregation as it breaks super project aggregation.
1 parent 6a57642 commit 7af4163

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

build.sbt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ lazy val chisel = (project in file(".")).
137137
// Prevent separate JARs from being generated for coreMacros and chiselFrontend.
138138
dependsOn(coreMacros % "compile-internal;test-internal").
139139
dependsOn(chiselFrontend % "compile-internal;test-internal").
140-
// The following is required until sbt-scoverage correctly deals with inDependencies
141-
// Unfortunately, it also revives publishing of the subproject jars. Disable until the latter is resolved (again).
142-
//aggregate(coreMacros, chiselFrontend).
140+
aggregate(coreMacros, chiselFrontend).
143141
settings(
144142
scalacOptions in Test ++= Seq("-language:reflectiveCalls"),
145143
scalacOptions in Compile in doc ++= Seq(
@@ -149,7 +147,13 @@ lazy val chisel = (project in file(".")).
149147
"-doc-title", name.value,
150148
"-doc-root-content", baseDirectory.value+"/root-doc.txt"
151149
),
152-
aggregate in doc := false,
150+
// Disable aggregation in general, but enable it for specific tasks.
151+
// Otherwise we get separate Jar files for each subproject and we
152+
// go to great pains to package all chisel3 core code in a single Jar.
153+
// If you get errors indicating coverageReport is undefined, be sure
154+
// you have sbt-scoverage in project/plugins.sbt
155+
aggregate := false,
156+
aggregate in coverageReport := true,
153157
// Include macro classes, resources, and sources main JAR.
154158
mappings in (Compile, packageBin) ++= (mappings in (coreMacros, Compile, packageBin)).value,
155159
mappings in (Compile, packageSrc) ++= (mappings in (coreMacros, Compile, packageSrc)).value,

0 commit comments

Comments
 (0)