@@ -319,10 +319,11 @@ object Build {
319
319
320
320
private lazy val currentYear : String = java.util.Calendar .getInstance().get(java.util.Calendar .YEAR ).toString
321
321
322
- lazy val scalacOptionsDocSettings = Seq (
323
- " -external-mappings:" +
324
- " .*scala/.*::scaladoc3::https://dotty.epfl.ch/api/," +
325
- " .*java/.*::javadoc::https://docs.oracle.com/javase/8/docs/api/" ,
322
+ def scalacOptionsDocSettings (includeExternalMappings : Boolean = true ) = {
323
+ val extMap = Seq (" -external-mappings:" +
324
+ (if (includeExternalMappings) " .*scala/.*::scaladoc3::https://dotty.epfl.ch/api/," else " " ) +
325
+ " .*java/.*::javadoc::https://docs.oracle.com/javase/8/docs/api/" )
326
+ Seq (
326
327
" -skip-by-regex:.+\\ .internal($|\\ ..+)" ,
327
328
" -skip-by-regex:.+\\ .impl($|\\ ..+)" ,
328
329
" -project-logo" , " docs/logo.svg" ,
@@ -340,7 +341,8 @@ object Build {
340
341
" -project-footer" , s " Copyright (c) 2002- $currentYear, LAMP/EPFL " ,
341
342
" -author" ,
342
343
" -groups"
343
- )
344
+ ) ++ extMap
345
+ }
344
346
345
347
// Settings used when compiling dotty with a non-bootstrapped dotty
346
348
lazy val commonBootstrappedSettings = commonDottySettings ++ NoBloopExport .settings ++ Seq (
@@ -423,7 +425,7 @@ object Build {
423
425
assert(docScalaInstance.loaderCompilerOnly == base.loaderCompilerOnly)
424
426
docScalaInstance
425
427
},
426
- Compile / doc / scalacOptions ++= scalacOptionsDocSettings
428
+ Compile / doc / scalacOptions ++= scalacOptionsDocSettings()
427
429
)
428
430
429
431
lazy val commonBenchmarkSettings = Seq (
@@ -1266,7 +1268,7 @@ object Build {
1266
1268
libraryDependencies += (" org.scala-js" %%% " scalajs-dom" % " 1.1.0" ).cross(CrossVersion .for3Use2_13)
1267
1269
)
1268
1270
1269
- def generateDocumentation (targets : Seq [String ], name : String , outDir : String , ref : String , params : Seq [String ] = Nil ) =
1271
+ def generateDocumentation (targets : Seq [String ], name : String , outDir : String , ref : String , params : Seq [String ] = Nil , includeExternalMappings : Boolean = true ) =
1270
1272
Def .taskDyn {
1271
1273
val distLocation = (dist / pack).value
1272
1274
val projectVersion = version.value
@@ -1294,7 +1296,7 @@ object Build {
1294
1296
dottySrcLink(referenceVersion, srcManaged(dottyNonBootstrappedVersion, " dotty" ) + " =" , " #library/src" ),
1295
1297
dottySrcLink(referenceVersion),
1296
1298
" -Ygenerate-inkuire" ,
1297
- ) ++ scalacOptionsDocSettings ++ revision ++ params ++ targets
1299
+ ) ++ scalacOptionsDocSettings(includeExternalMappings) ++ revision ++ params ++ targets
1298
1300
import _root_ .scala .sys .process ._
1299
1301
val escapedCmd = cmd.map(arg => if (arg.contains(" " )) s """ " $arg" """ else arg)
1300
1302
Def .task {
@@ -1424,7 +1426,7 @@ object Build {
1424
1426
" https://scala-lang.org/api/versions.json" ,
1425
1427
" -Ydocument-synthetic-types" ,
1426
1428
s " -snippet-compiler: ${dottyLibRoot}/scala/quoted=compile, ${dottyLibRoot}/scala/compiletime=compile "
1427
- ) ++ (if (justAPI) Nil else Seq (" -siteroot" , " docs-for-dotty-page" , " -Yapi-subdirectory" )))
1429
+ ) ++ (if (justAPI) Nil else Seq (" -siteroot" , " docs-for-dotty-page" , " -Yapi-subdirectory" )), includeExternalMappings = false )
1428
1430
1429
1431
if (dottyJars.isEmpty) Def .task { streams.value.log.error(" Dotty lib wasn't found" ) }
1430
1432
else if (justAPI) generateDocTask
0 commit comments