@@ -284,6 +284,26 @@ object Build {
284
284
disableDocSetting
285
285
)
286
286
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
+
287
307
// Settings used when compiling dotty with a non-bootstrapped dotty
288
308
lazy val commonBootstrappedSettings = commonDottySettings ++ NoBloopExport .settings ++ Seq (
289
309
bspEnabled := false ,
@@ -343,25 +363,7 @@ object Build {
343
363
appConfiguration.value
344
364
)
345
365
},
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,
365
367
// sbt-dotty defines `scalaInstance in doc` so we need to override it manually
366
368
scalaInstance in doc := scalaInstance.value
367
369
)
@@ -1613,7 +1615,7 @@ object Build {
1613
1615
val srcManaged = s " out/bootstrap/stdlib-bootstrapped/scala- $baseVersion/src_managed/main/scala-library-src "
1614
1616
val sourceLinks = s " -source-links: $srcManaged=github://scala/scala/v $scala3version#src/library "
1615
1617
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
1617
1619
import _root_ .scala .sys .process ._
1618
1620
Def .task((s " $distLocation/bin/scaladoc " +: cmd).! )
1619
1621
}
0 commit comments