-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
506 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,47 @@ | ||
// See LICENSE for license details. | ||
|
||
site.settings | ||
|
||
site.includeScaladoc() | ||
|
||
ghpages.settings | ||
|
||
import UnidocKeys._ | ||
|
||
lazy val customUnidocSettings = unidocSettings ++ Seq ( | ||
doc in Compile := (doc in ScalaUnidoc).value, | ||
target in unidoc in ScalaUnidoc := crossTarget.value / "api" | ||
) | ||
enablePlugins(SiteScaladocPlugin) | ||
|
||
enablePlugins(GhpagesPlugin) | ||
|
||
def scalacOptionsVersion(scalaVersion: String): Seq[String] = { | ||
Seq() ++ { | ||
// If we're building with Scala > 2.11, enable the compile option | ||
// switch to support our anonymous Bundle definitions: | ||
// https://github.com/scala/bug/issues/10047 | ||
CrossVersion.partialVersion(scalaVersion) match { | ||
case Some((2, scalaMajor: Int)) if scalaMajor < 12 => Seq() | ||
case _ => Seq("-Xsource:2.11") | ||
} | ||
} | ||
} | ||
|
||
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: Int)) if scalaMajor < 12 => | ||
Seq("-source", "1.7", "-target", "1.7") | ||
case _ => | ||
Seq("-source", "1.8", "-target", "1.8") | ||
} | ||
} | ||
} | ||
|
||
lazy val commonSettings = Seq ( | ||
organization := "edu.berkeley.cs", | ||
version := "3.0-SNAPSHOT_2017-08-16", | ||
git.remoteRepo := "[email protected]:ucb-bar/chisel3.git", | ||
version := "3.0-SNAPSHOT_2017-09-14", | ||
git.remoteRepo := "[email protected]:freechipsproject/chisel3.git", | ||
autoAPIMappings := true, | ||
scalaVersion := "2.11.11", | ||
crossScalaVersions := Seq("2.11.11", "2.12.3"), | ||
resolvers ++= Seq( | ||
Resolver.sonatypeRepo("snapshots"), | ||
Resolver.sonatypeRepo("releases") | ||
), | ||
scalacOptions := Seq("-deprecation", "-feature"), | ||
scalacOptions := Seq("-deprecation", "-feature") ++ scalacOptionsVersion(scalaVersion.value), | ||
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, | ||
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full), | ||
// Use the root project's unmanaged base for all sub-projects. | ||
|
@@ -54,8 +72,8 @@ lazy val publishSettings = Seq ( | |
</license> | ||
</licenses> | ||
<scm> | ||
<url>https://github.com/ucb-bar/chisel3.git</url> | ||
<connection>scm:git:github.com/ucb-bar/chisel3.git</connection> | ||
<url>https://github.com/freechipsproject/chisel3.git</url> | ||
<connection>scm:git:github.com/freechipsproject/chisel3.git</connection> | ||
</scm> | ||
<developers> | ||
<developer> | ||
|
@@ -77,7 +95,7 @@ lazy val publishSettings = Seq ( | |
} | ||
) | ||
|
||
val defaultVersions = Map("firrtl" -> "1.0-SNAPSHOT_2017-08-16") | ||
val defaultVersions = Map("firrtl" -> "1.0-SNAPSHOT_2017-09-14") | ||
|
||
lazy val chiselSettings = Seq ( | ||
name := "chisel3", | ||
|
@@ -89,13 +107,13 @@ lazy val chiselSettings = Seq ( | |
libraryDependencies ++= Seq( | ||
"org.scalatest" %% "scalatest" % "3.0.1" % "test", | ||
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test", | ||
"com.github.scopt" %% "scopt" % "3.5.0" | ||
"com.github.scopt" %% "scopt" % "3.6.0" | ||
), | ||
|
||
// Tests from other projects may still run concurrently. | ||
parallelExecution in Test := true, | ||
|
||
javacOptions ++= Seq("-target", "1.7") | ||
javacOptions ++= javacOptionsVersion(scalaVersion.value) | ||
) | ||
|
||
lazy val coreMacros = (project in file("coreMacros")). | ||
|
@@ -112,14 +130,14 @@ lazy val root = RootProject(file(".")) | |
|
||
lazy val chisel = (project in file(".")). | ||
enablePlugins(BuildInfoPlugin). | ||
enablePlugins(ScalaUnidocPlugin). | ||
settings( | ||
buildInfoPackage := name.value, | ||
buildInfoOptions += BuildInfoOption.BuildTime, | ||
buildInfoUsePackageAsPath := true, | ||
buildInfoKeys := Seq[BuildInfoKey](buildInfoPackage, version, scalaVersion, sbtVersion) | ||
). | ||
settings(commonSettings: _*). | ||
settings(customUnidocSettings: _*). | ||
settings(chiselSettings: _*). | ||
settings(publishSettings: _*). | ||
// Prevent separate JARs from being generated for coreMacros and chiselFrontend. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.