summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchick2016-02-24 13:03:02 -0800
committerchick2016-02-24 13:03:02 -0800
commit5f02c7a69a77dceef65c9155c1418131730cb95d (patch)
tree5476f3cddbdf7abdda3df4d3369a6c33f4ddf7b3
parenta7af7415d6da73af418d126d72dda8ab77ceebee (diff)
changing build.sbt to prepare for chisel3 distribution
copied machinery from chisel2 build.sbt added a few intellij lines to gitignore
-rw-r--r--.gitignore3
-rw-r--r--build.sbt86
2 files changed, 76 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index e59c9b3b..3242c220 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
generated/
/bin/
+.idea
+target/
+*.iml \ No newline at end of file
diff --git a/build.sbt b/build.sbt
index 664a717e..87220069 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,22 +1,82 @@
-organization := "edu.berkeley.cs"
+// See LICENSE for license details.
-version := "3.0"
+site.settings
-name := "Chisel"
+site.includeScaladoc()
-scalaVersion := "2.11.6"
+ghpages.settings
-libraryDependencies ++= Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value,
- "org.scalatest" % "scalatest_2.11" % "2.2.4" % "test",
- "org.scalacheck" %% "scalacheck" % "1.12.4" % "test")
+lazy val chiselBuildSettings = Seq (
+ organization := "edu.berkeley.cs",
+ version := "3.0",
+ name := "Chisel",
+ git.remoteRepo := "git@github.com:ucb-bar/chisel3.git",
-site.settings
+ scalaVersion := "2.11.7",
+ publishMavenStyle := true,
+ publishArtifact in Test := false,
+ pomIncludeRepository := { x => false },
+ pomExtra := <url>http://chisel.eecs.berkeley.edu/</url>
+ <licenses>
+ <license>
+ <name>BSD-style</name>
+ <url>http://www.opensource.org/licenses/bsd-license.php</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+ <url>https://github.com/ucb-bar/chisel3.git</url>
+ <connection>scm:git:github.com/ucb-bar/chisel3.git</connection>
+ </scm>
+ <developers>
+ <developer>
+ <id>jackbackrack</id>
+ <name>Jonathan Bachrach</name>
+ <url>http://www.eecs.berkeley.edu/~jrb/</url>
+ </developer>
+ </developers>,
-site.includeScaladoc()
+ publishTo <<= version { v: String =>
+ val nexus = "https://oss.sonatype.org/"
+ if (v.trim.endsWith("SNAPSHOT")) {
+ Some("snapshots" at nexus + "content/repositories/snapshots")
+ }
+ else {
+ Some("releases" at nexus + "service/local/staging/deploy/maven2")
+ }
+ },
-ghpages.settings
+ resolvers ++= Seq(
+ "Sonatype Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots",
+ "Sonatype Releases" at "http://oss.sonatype.org/content/repositories/releases"
+ ),
+
+ /* Bumping "com.novocode" % "junit-interface" % "0.11", causes DelayTest testSeqReadBundle to fail
+ * in subtly disturbing ways on Linux (but not on Mac):
+ * - some fields in the generated .h file are re-named,
+ * - an additional field is added
+ * - the generated .cpp file has additional differences:
+ * - different temps in clock_lo
+ * - missing assignments
+ * - change of assignment order
+ * - use of "Tx" vs. "Tx.values"
+ */
+ libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.5" % "test",
+ libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
+ libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.12.4" % "test",
+
+ // Tests from other projects may still run concurrently.
+ parallelExecution in Test := true,
+
+ (scalastyleConfig in Test) := baseDirectory.value / "scalastyle-test-config.xml",
-git.remoteRepo := "git@github.com:ucb-bar/chisel3.git"
+ javacOptions ++= Seq("-target", "1.7")
+ // Hopefully we get these options back in Chisel3
+ // scalacOptions in (Compile, doc) <++= (baseDirectory in LocalProject("chisel"), version) map { (bd, v) =>
+ // Seq("-diagrams", "-diagrams-max-classes", "25", "-sourcepath", bd.getAbsolutePath, "-doc-source-url",
+ // "https://github.com/ucb-bar/chisel/tree/master/€{FILE_PATH}.scala")
+ // }
+)
-(scalastyleConfig in Test) := baseDirectory.value / "scalastyle-test-config.xml"
-(parallelExecution in Test) := true
+lazy val chisel = (project in file(".")).
+ settings(chiselBuildSettings: _*)