@@ -1241,7 +1241,7 @@ object Build {
12411241 libraryDependencies += (" org.scala-js" %%% " scalajs-dom" % " 1.1.0" ).cross(CrossVersion .for3Use2_13)
12421242 )
12431243
1244- def generateDocumentation (targets : Seq [String ], name : String , outDir : String , ref : String , params : Seq [String ] = Nil , usingScript : Boolean = true ) =
1244+ def generateDocumentation (targets : Seq [String ], name : String , outDir : String , ref : String , params : Seq [String ] = Nil ) =
12451245 Def .taskDyn {
12461246 val distLocation = (dist / pack).value
12471247 val projectVersion = version.value
@@ -1265,20 +1265,10 @@ object Build {
12651265 s " -source-links:github://lampepfl/dotty/ $referenceVersion" ,
12661266 ) ++ scalacOptionsDocSettings ++ revision ++ params ++ targets
12671267 import _root_ .scala .sys .process ._
1268- if (usingScript)
1269- Def .task((s " $distLocation/bin/scaladoc " +: cmd).! )
1270- else {
1271- val escapedCmd = cmd.map(arg => if (arg.contains(" " )) s """ " $arg" """ else arg)
1272- Def .task {
1273- try {
1274- (Compile / run).toTask(escapedCmd.mkString(" " , " " , " " )).value
1275- 0
1276- } catch {
1277- case _ : Throwable => 1
1278- }
1279- }
1268+ val escapedCmd = cmd.map(arg => if (arg.contains(" " )) s """ " $arg" """ else arg)
1269+ Def .task {
1270+ (Compile / run).toTask(escapedCmd.mkString(" " , " " , " " )).value
12801271 }
1281-
12821272 }
12831273
12841274 val SourceLinksIntegrationTest = config(" sourceLinksIntegrationTest" ) extend Test
@@ -1325,7 +1315,7 @@ object Build {
13251315 generateSelfDocumentation := Def .taskDyn {
13261316 generateDocumentation(
13271317 (Compile / classDirectory).value.getAbsolutePath :: Nil ,
1328- " scaladoc" , " scaladoc/output/self" , VersionUtil .gitHash
1318+ " scaladoc" , " scaladoc/output/self" , VersionUtil .gitHash, Seq ( " -usejavacp " )
13291319 )
13301320 }.value,
13311321 generateScalaDocumentation := Def .inputTaskDyn {
@@ -1366,16 +1356,16 @@ object Build {
13661356 s " -source-links:docs=github://lampepfl/dotty/master#docs " ,
13671357 " -doc-root-content" , docRootFile.toString,
13681358 " -Ydocument-synthetic-types"
1369- ), usingScript = false
1370- ))
1359+ )))
13711360 }.evaluated,
13721361
13731362 generateTestcasesDocumentation := Def .taskDyn {
13741363 generateDocumentation(
13751364 (Test / Build .testcasesOutputDir).value,
13761365 " scaladoc testcases" ,
13771366 " scaladoc/output/testcases" ,
1378- " master"
1367+ " master" ,
1368+ Seq (" -usejavacp" )
13791369 )
13801370 }.value,
13811371
0 commit comments