only unidoc for Scala 2.12, #25985
* otherwise the docs built with 2.11 will be published for release, since the 2.11 build is last
This commit is contained in:
parent
7afd847758
commit
4742a23e9e
2 changed files with 11 additions and 4 deletions
|
|
@ -53,7 +53,12 @@ lazy val root = Project(
|
|||
base = file(".")
|
||||
).aggregate(aggregatedProjects: _*)
|
||||
.settings(rootSettings: _*)
|
||||
.settings(unidocRootIgnoreProjects := Seq(remoteTests, benchJmh, protobuf, akkaScalaNightly, docs))
|
||||
.settings(unidocRootIgnoreProjects :=
|
||||
(CrossVersion.partialVersion(scalaVersion.value) match {
|
||||
case Some((2, n)) if n == 11 ⇒ aggregatedProjects // ignore all, don't unidoc when scalaVersion is 2.11
|
||||
case _ ⇒ Seq(remoteTests, benchJmh, protobuf, akkaScalaNightly, docs)
|
||||
})
|
||||
)
|
||||
.settings(
|
||||
unmanagedSources in(Compile, headerCreate) := (baseDirectory.value / "project").**("*.scala").get
|
||||
)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import sbt.Keys._
|
|||
import sbt.File
|
||||
import scala.annotation.tailrec
|
||||
|
||||
import sbt.ScopeFilter.ProjectFilter
|
||||
|
||||
object Scaladoc extends AutoPlugin {
|
||||
|
||||
object CliOptions {
|
||||
|
|
@ -100,7 +102,7 @@ object UnidocRoot extends AutoPlugin {
|
|||
}
|
||||
|
||||
object autoImport {
|
||||
val unidocRootIgnoreProjects = settingKey[Seq[Project]]("Projects to ignore when generating unidoc")
|
||||
val unidocRootIgnoreProjects = settingKey[Seq[ProjectReference]]("Projects to ignore when generating unidoc")
|
||||
}
|
||||
import autoImport._
|
||||
|
||||
|
|
@ -113,7 +115,7 @@ object UnidocRoot extends AutoPlugin {
|
|||
Seq(javacOptions in (JavaUnidoc, unidoc) := Seq("-Xdoclint:none"))).getOrElse(Nil)
|
||||
|
||||
override lazy val projectSettings = {
|
||||
def unidocRootProjectFilter(ignoreProjects: Seq[Project]) =
|
||||
def unidocRootProjectFilter(ignoreProjects: Seq[ProjectReference]): ProjectFilter =
|
||||
ignoreProjects.foldLeft(inAnyProject) { _ -- inProjects(_) }
|
||||
|
||||
inTask(unidoc)(Seq(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue