Skip to content

Commit 8093a91

Browse files
committed
Fix passing arguments for scaladoc/generateScala... tasks
1 parent 725af89 commit 8093a91

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

project/Build.scala

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,26 @@ object Build {
284284
disableDocSetting
285285
)
286286

287+
lazy val scalacOptionsDocSettings = Seq(
288+
"-external-mappings:" +
289+
".*scala.*::scaladoc3::http://dotty.epfl.ch/api/," +
290+
".*java.*::javadoc::https://docs.oracle.com/javase/8/docs/api/",
291+
"-skip-by-regex:.+\\.internal($|\\..+)",
292+
"-skip-by-regex:.+\\.impl($|\\..+)",
293+
"-project-logo", "docs/logo.svg",
294+
"-social-links:" +
295+
"github::https://github.com/lampepfl/dotty," +
296+
"gitter::https://gitter.im/scala/scala," +
297+
"twitter::https://twitter.com/scala_lang",
298+
// contains special definitions which are "transplanted" elsewhere
299+
// and which therefore confuse Scaladoc when accessed from this pkg
300+
"-skip-by-id:scala.runtime.stdLibPatches",
301+
// MatchCase is a special type that represents match type cases,
302+
// Reflect doesn't expect to see it as a standalone definition
303+
// and therefore it's easier just not to document it
304+
"-skip-by-id:scala.runtime.MatchCase",
305+
)
306+
287307
// Settings used when compiling dotty with a non-bootstrapped dotty
288308
lazy val commonBootstrappedSettings = commonDottySettings ++ NoBloopExport.settings ++ Seq(
289309
bspEnabled := false,
@@ -343,25 +363,7 @@ object Build {
343363
appConfiguration.value
344364
)
345365
},
346-
Compile / doc / scalacOptions ++= Seq(
347-
"-external-mappings:" +
348-
".*scala.*::scaladoc3::http://dotty.epfl.ch/api/," +
349-
".*java.*::javadoc::https://docs.oracle.com/javase/8/docs/api/",
350-
"-skip-by-regex:.+\\.internal($|\\..+)",
351-
"-skip-by-regex:.+\\.impl($|\\..+)",
352-
"-project-logo", "docs/logo.svg",
353-
"-social-links:" +
354-
"github::https://github.com/lampepfl/dotty," +
355-
"gitter::https://gitter.im/scala/scala," +
356-
"twitter::https://twitter.com/scala_lang",
357-
// contains special definitions which are "transplanted" elsewhere
358-
// and which therefore confuse Scaladoc when accessed from this pkg
359-
"-skip-by-id:scala.runtime.stdLibPatches",
360-
// MatchCase is a special type that represents match type cases,
361-
// Reflect doesn't expect to see it as a standalone definition
362-
// and therefore it's easier just not to document it
363-
"-skip-by-id:scala.runtime.MatchCase",
364-
),
366+
Compile / doc / scalacOptions ++= scalacOptionsDocSettings,
365367
// sbt-dotty defines `scalaInstance in doc` so we need to override it manually
366368
scalaInstance in doc := scalaInstance.value
367369
)
@@ -1613,7 +1615,7 @@ object Build {
16131615
val srcManaged = s"out/bootstrap/stdlib-bootstrapped/scala-$baseVersion/src_managed/main/scala-library-src"
16141616
val sourceLinks = s"-source-links:$srcManaged=github://scala/scala/v$scala3version#src/library"
16151617
val revision = Seq("-revision", ref, "-project-version", projectVersion)
1616-
val cmd = Seq("-d", outDir, "-project", name, sourceLinks) ++ revision ++ params ++ targets
1618+
val cmd = Seq("-d", outDir, "-project", name, sourceLinks) ++ scalacOptionsDocSettings ++ revision ++ params ++ targets
16171619
import _root_.scala.sys.process._
16181620
Def.task((s"$distLocation/bin/scaladoc" +: cmd).!)
16191621
}

0 commit comments

Comments
 (0)