Skip to content

Commit

Permalink
Merge pull request #958 from mikejcurry/no-scaladoc-for-2.10
Browse files Browse the repository at this point in the history
Switch off scaladoc generation for Scala 2.10 due to macro problems
  • Loading branch information
ceedubs committed Mar 28, 2016
2 parents f51b977 + 5b16290 commit 58362c2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,21 @@ lazy val disciplineDependencies = Seq(
libraryDependencies += "org.typelevel" %%% "discipline" % "0.4"
)

/**
* Remove 2.10 projects from doc generation, as the macros used in the projects
* cause problems generating the documentation on scala 2.10. As the APIs for 2.10
* and 2.11 are the same this has no effect on the resultant documentation, though
* it does mean that the scaladocs cannot be generated when the build is in 2.10 mode.
*/
def noDocProjects(sv: String): Seq[ProjectReference] = CrossVersion.partialVersion(sv) match {
case Some((2, 10)) => Seq[ProjectReference](coreJVM)
case _ => Nil
}

lazy val docSettings = Seq(
autoAPIMappings := true,
unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(coreJVM),
unidocProjectFilter in (ScalaUnidoc, unidoc) :=
inProjects(coreJVM) -- inProjects(noDocProjects(scalaVersion.value): _*),
site.addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), "api"),
site.addMappingsToSiteDir(tut, "_tut"),
ghpagesNoJekyll := false,
Expand Down

0 comments on commit 58362c2

Please sign in to comment.