Skip to content

Commit 5a2f6cb

Browse files
committed
re-enable doc generation on JDK 11 and on Scala 3
it appears whatever problems we were working around no longer exist?
1 parent 0963ad8 commit 5a2f6cb

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed

build.sbt

+19-29
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
val disableDocs =
2-
sys.props("nodocs") == "true" ||
3-
// on jdk 11 https://github.com/scala/scala-java8-compat/issues/160, seems to fail the build (not on 8)
4-
!sys.props("java.version").startsWith("1.")
5-
61
lazy val JavaDoc = config("genjavadoc") extend Compile
72

83
def jwrite(dir: java.io.File, pck: String = "scala/compat/java8")(name: String, content: String) = {
@@ -102,32 +97,27 @@ lazy val scalaJava8Compat = (project in file("."))
10297
if (Set("1.5", "1.6", "1.7") contains specVersion)
10398
sys.error("Java 8 or higher is required for this project.")
10499
},
105-
106-
packageDoc / publishArtifact := !disableDocs && !scalaVersion.value.startsWith("3.")
107100
)
108101
.settings(
109-
inConfig(JavaDoc)(Defaults.configSettings) ++ {
110-
if (disableDocs) Nil
111-
else Seq(
112-
Compile / packageDoc := (JavaDoc / packageDoc).value,
113-
JavaDoc / sources := {
114-
val allJavaSources =
115-
(target.value / "java" ** "*.java").get ++
116-
(Compile / sources).value.filter(_.getName.endsWith(".java"))
117-
allJavaSources.filterNot(_.getName.contains("FuturesConvertersImpl.java")) // this file triggers bugs in genjavadoc
118-
},
119-
JavaDoc / javacOptions := Seq("-Xdoclint:none"),
120-
JavaDoc / packageDoc / artifactName := ((sv, mod, art) => "" + mod.name + "_" + sv.binary + "-" + mod.revision + "-javadoc.jar"),
121-
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
122-
case Some((3, _)) => Seq()
123-
case _ => Seq(compilerPlugin("com.typesafe.genjavadoc" % "genjavadoc-plugin" % "0.18" cross CrossVersion.full))
124-
}),
125-
Compile / scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
126-
case Some((3, _)) => Seq()
127-
case _ => Seq(s"""-P:genjavadoc:out=${target.value / "java"}""")
128-
}),
129-
)
130-
}
102+
inConfig(JavaDoc)(Defaults.configSettings) ++ Seq(
103+
Compile / packageDoc := (JavaDoc / packageDoc).value,
104+
JavaDoc / sources := {
105+
val allJavaSources =
106+
(target.value / "java" ** "*.java").get ++
107+
(Compile / sources).value.filter(_.getName.endsWith(".java"))
108+
allJavaSources.filterNot(_.getName.contains("FuturesConvertersImpl.java")) // this file triggers bugs in genjavadoc
109+
},
110+
JavaDoc / javacOptions := Seq("-Xdoclint:none"),
111+
JavaDoc / packageDoc / artifactName := ((sv, mod, art) => "" + mod.name + "_" + sv.binary + "-" + mod.revision + "-javadoc.jar"),
112+
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
113+
case Some((3, _)) => Seq()
114+
case _ => Seq(compilerPlugin("com.typesafe.genjavadoc" % "genjavadoc-plugin" % "0.18" cross CrossVersion.full))
115+
}),
116+
Compile / scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
117+
case Some((3, _)) => Seq()
118+
case _ => Seq(s"""-P:genjavadoc:out=${target.value / "java"}""")
119+
}),
120+
)
131121
)
132122
.settings(
133123
initialCommands :=

0 commit comments

Comments
 (0)