1
1
// See LICENSE for license details.
2
2
3
- site.settings
4
-
5
- site.includeScaladoc()
6
-
7
- ghpages.settings
8
-
9
- import UnidocKeys ._
10
-
11
- lazy val customUnidocSettings = unidocSettings ++ Seq (
12
- doc in Compile := (doc in ScalaUnidoc ).value,
13
- target in unidoc in ScalaUnidoc := crossTarget.value / " api"
14
- )
3
+ enablePlugins(SiteScaladocPlugin )
4
+
5
+ enablePlugins(GhpagesPlugin )
6
+
7
+ def scalacOptionsVersion (scalaVersion : String ): Seq [String ] = {
8
+ Seq () ++ {
9
+ // If we're building with Scala > 2.11, enable the compile option
10
+ // switch to support our anonymous Bundle definitions:
11
+ // https://github.com/scala/bug/issues/10047
12
+ CrossVersion .partialVersion(scalaVersion) match {
13
+ case Some ((2 , scalaMajor : Int )) if scalaMajor < 12 => Seq ()
14
+ case _ => Seq (" -Xsource:2.11" )
15
+ }
16
+ }
17
+ }
18
+
19
+ def javacOptionsVersion (scalaVersion : String ): Seq [String ] = {
20
+ Seq () ++ {
21
+ // Scala 2.12 requires Java 8. We continue to generate
22
+ // Java 7 compatible code for Scala 2.11
23
+ // for compatibility with old clients.
24
+ CrossVersion .partialVersion(scalaVersion) match {
25
+ case Some ((2 , scalaMajor : Int )) if scalaMajor < 12 =>
26
+ Seq (" -source" , " 1.7" , " -target" , " 1.7" )
27
+ case _ =>
28
+ Seq (" -source" , " 1.8" , " -target" , " 1.8" )
29
+ }
30
+ }
31
+ }
15
32
16
33
val defaultVersions = Map (" firrtl" -> " 1.1-SNAPSHOT" )
17
34
18
35
lazy val commonSettings = Seq (
19
36
organization := " edu.berkeley.cs" ,
20
37
version := " 3.1-SNAPSHOT" ,
21
- git.remoteRepo := " git@github.com:ucb-bar /chisel3.git" ,
38
+ git.remoteRepo := " git@github.com:freechipsproject /chisel3.git" ,
22
39
autoAPIMappings := true ,
23
40
scalaVersion := " 2.11.11" ,
24
- scalacOptions := Seq (" -deprecation" , " -feature" ),
41
+ crossScalaVersions := Seq (" 2.11.11" , " 2.12.3" ),
42
+ scalacOptions := Seq (" -deprecation" , " -feature" ) ++ scalacOptionsVersion(scalaVersion.value),
25
43
libraryDependencies += " org.scala-lang" % " scala-reflect" % scalaVersion.value,
26
44
addCompilerPlugin(" org.scalamacros" % " paradise" % " 2.1.0" cross CrossVersion .full),
27
45
// Use the root project's unmanaged base for all sub-projects.
@@ -54,8 +72,8 @@ lazy val chiselSettings = Seq (
54
72
</license >
55
73
</licenses >
56
74
<scm >
57
- <url >https:// github.com/ ucb - bar / chisel3.git</url >
58
- <connection >scm: git: github.com/ ucb - bar / chisel3.git</connection >
75
+ <url >https:// github.com/ freechipsproject / chisel3.git</url >
76
+ <connection >scm: git: github.com/ freechipsproject / chisel3.git</connection >
59
77
</scm >
60
78
<developers >
61
79
<developer >
@@ -84,13 +102,13 @@ lazy val chiselSettings = Seq (
84
102
libraryDependencies ++= Seq (
85
103
" org.scalatest" %% " scalatest" % " 3.0.1" % " test" ,
86
104
" org.scalacheck" %% " scalacheck" % " 1.13.4" % " test" ,
87
- " com.github.scopt" %% " scopt" % " 3.5 .0"
105
+ " com.github.scopt" %% " scopt" % " 3.6 .0"
88
106
),
89
107
90
108
// Tests from other projects may still run concurrently.
91
109
parallelExecution in Test := true ,
92
110
93
- javacOptions ++= Seq ( " -target " , " 1.7 " )
111
+ javacOptions ++= javacOptionsVersion(scalaVersion.value )
94
112
)
95
113
96
114
lazy val coreMacros = (project in file(" coreMacros" )).
@@ -107,14 +125,14 @@ lazy val root = RootProject(file("."))
107
125
108
126
lazy val chisel = (project in file(" ." )).
109
127
enablePlugins(BuildInfoPlugin ).
128
+ enablePlugins(ScalaUnidocPlugin ).
110
129
settings(
111
130
buildInfoPackage := name.value,
112
131
buildInfoOptions += BuildInfoOption .BuildTime ,
113
132
buildInfoUsePackageAsPath := true ,
114
133
buildInfoKeys := Seq [BuildInfoKey ](buildInfoPackage, version, scalaVersion, sbtVersion)
115
134
).
116
135
settings(commonSettings : _* ).
117
- settings(customUnidocSettings : _* ).
118
136
settings(chiselSettings : _* ).
119
137
// Prevent separate JARs from being generated for coreMacros and chiselFrontend.
120
138
dependsOn(coreMacros % " compile-internal;test-internal" ).
0 commit comments