@@ -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 ++ Seq (
289
309
unmanagedSourceDirectories in Compile += baseDirectory.value / " src-bootstrapped" ,
@@ -342,25 +362,7 @@ object Build {
342
362
appConfiguration.value
343
363
)
344
364
},
345
- Compile / doc / scalacOptions ++= Seq (
346
- " -external-mappings:" +
347
- " .*scala.*::scaladoc3::http://dotty.epfl.ch/api/," +
348
- " .*java.*::javadoc::https://docs.oracle.com/javase/8/docs/api/" ,
349
- " -skip-by-regex:.+\\ .internal($|\\ ..+)" ,
350
- " -skip-by-regex:.+\\ .impl($|\\ ..+)" ,
351
- " -project-logo" , " docs/logo.svg" ,
352
- " -social-links:" +
353
- " github::https://github.com/lampepfl/dotty," +
354
- " gitter::https://gitter.im/scala/scala," +
355
- " twitter::https://twitter.com/scala_lang" ,
356
- // contains special definitions which are "transplanted" elsewhere
357
- // and which therefore confuse Scaladoc when accessed from this pkg
358
- " -skip-by-id:scala.runtime.stdLibPatches" ,
359
- // MatchCase is a special type that represents match type cases,
360
- // Reflect doesn't expect to see it as a standalone definition
361
- // and therefore it's easier just not to document it
362
- " -skip-by-id:scala.runtime.MatchCase" ,
363
- ),
365
+ Compile / doc / scalacOptions ++= scalacOptionsDocSettings,
364
366
// sbt-dotty defines `scalaInstance in doc` so we need to override it manually
365
367
scalaInstance in doc := scalaInstance.value
366
368
)
@@ -1609,7 +1611,7 @@ object Build {
1609
1611
val srcManaged = s " out/bootstrap/stdlib-bootstrapped/scala- $baseVersion/src_managed/main/scala-library-src "
1610
1612
val sourceLinks = s " -source-links: $srcManaged=github://scala/scala/v $scala3version#src/library "
1611
1613
val revision = Seq (" -revision" , ref, " -project-version" , projectVersion)
1612
- val cmd = Seq (" -d" , outDir, " -project" , name, sourceLinks) ++ revision ++ params ++ targets
1614
+ val cmd = Seq (" -d" , outDir, " -project" , name, sourceLinks) ++ scalacOptionsDocSettings ++ revision ++ params ++ targets
1613
1615
import _root_ .scala .sys .process ._
1614
1616
Def .task((s " $distLocation/bin/scaladoc " +: cmd).! )
1615
1617
}
@@ -1660,9 +1662,7 @@ object Build {
1660
1662
Seq (
1661
1663
" -comment-syntax" , " wiki" ,
1662
1664
" -siteroot" , " docs" ,
1663
- s " -source-links: " +
1664
- s " $stdLibRoot=github://scala/scala/v ${stdlibVersion(Bootstrapped )}#src/library, " +
1665
- s " docs=github://lampepfl/dotty/master#docs " ,
1665
+ s " -source-links:docs=github://lampepfl/dotty/master#docs " ,
1666
1666
" -doc-root-content" , docRootFile.toString
1667
1667
)
1668
1668
))
0 commit comments