@@ -291,6 +291,26 @@ object Build {
291
291
disableDocSetting
292
292
)
293
293
294
+ lazy val scalacOptionsDocSettings = Seq (
295
+ " -external-mappings:" +
296
+ " .*scala.*::scaladoc3::http://dotty.epfl.ch/api/," +
297
+ " .*java.*::javadoc::https://docs.oracle.com/javase/8/docs/api/" ,
298
+ " -skip-by-regex:.+\\ .internal($|\\ ..+)" ,
299
+ " -skip-by-regex:.+\\ .impl($|\\ ..+)" ,
300
+ " -project-logo" , " docs/logo.svg" ,
301
+ " -social-links:" +
302
+ " github::https://github.com/lampepfl/dotty," +
303
+ " gitter::https://gitter.im/scala/scala," +
304
+ " twitter::https://twitter.com/scala_lang" ,
305
+ // contains special definitions which are "transplanted" elsewhere
306
+ // and which therefore confuse Scaladoc when accessed from this pkg
307
+ " -skip-by-id:scala.runtime.stdLibPatches" ,
308
+ // MatchCase is a special type that represents match type cases,
309
+ // Reflect doesn't expect to see it as a standalone definition
310
+ // and therefore it's easier just not to document it
311
+ " -skip-by-id:scala.runtime.MatchCase" ,
312
+ )
313
+
294
314
// Settings used when compiling dotty with a non-bootstrapped dotty
295
315
lazy val commonBootstrappedSettings = commonDottySettings ++ NoBloopExport .settings ++ Seq (
296
316
bspEnabled := false ,
@@ -350,25 +370,7 @@ object Build {
350
370
appConfiguration.value
351
371
)
352
372
},
353
- Compile / doc / scalacOptions ++= Seq (
354
- " -external-mappings:" +
355
- " .*scala.*::scaladoc3::http://dotty.epfl.ch/api/," +
356
- " .*java.*::javadoc::https://docs.oracle.com/javase/8/docs/api/" ,
357
- " -skip-by-regex:.+\\ .internal($|\\ ..+)" ,
358
- " -skip-by-regex:.+\\ .impl($|\\ ..+)" ,
359
- " -project-logo" , " docs/logo.svg" ,
360
- " -social-links:" +
361
- " github::https://github.com/lampepfl/dotty," +
362
- " gitter::https://gitter.im/scala/scala," +
363
- " twitter::https://twitter.com/scala_lang" ,
364
- // contains special definitions which are "transplanted" elsewhere
365
- // and which therefore confuse Scaladoc when accessed from this pkg
366
- " -skip-by-id:scala.runtime.stdLibPatches" ,
367
- // MatchCase is a special type that represents match type cases,
368
- // Reflect doesn't expect to see it as a standalone definition
369
- // and therefore it's easier just not to document it
370
- " -skip-by-id:scala.runtime.MatchCase" ,
371
- ),
373
+ Compile / doc / scalacOptions ++= scalacOptionsDocSettings,
372
374
// sbt-dotty defines `scalaInstance in doc` so we need to override it manually
373
375
doc / scalaInstance := scalaInstance.value,
374
376
)
@@ -1616,7 +1618,7 @@ object Build {
1616
1618
val srcManaged = s " out/bootstrap/stdlib-bootstrapped/scala- $baseVersion/src_managed/main/scala-library-src "
1617
1619
val sourceLinks = s " -source-links: $srcManaged=github://scala/scala/v ${stdlibVersion(Bootstrapped )}}#src/library "
1618
1620
val revision = Seq (" -revision" , ref, " -project-version" , projectVersion)
1619
- val cmd = Seq (" -d" , outDir, " -project" , name, sourceLinks) ++ revision ++ params ++ targets
1621
+ val cmd = Seq (" -d" , outDir, " -project" , name, sourceLinks) ++ scalacOptionsDocSettings ++ revision ++ params ++ targets
1620
1622
import _root_ .scala .sys .process ._
1621
1623
Def .task((s " $distLocation/bin/scaladoc " +: cmd).! )
1622
1624
}
0 commit comments