@@ -1233,7 +1233,7 @@ object Build {
1233
1233
libraryDependencies += (" org.scala-js" %%% " scalajs-dom" % " 1.1.0" ).cross(CrossVersion .for3Use2_13)
1234
1234
)
1235
1235
1236
- def generateDocumentation (targets : Seq [String ], name : String , outDir : String , ref : String , params : Seq [String ] = Nil , usingScript : Boolean = true ) =
1236
+ def generateDocumentation (targets : Seq [String ], name : String , outDir : String , ref : String , params : Seq [String ] = Nil ) =
1237
1237
Def .taskDyn {
1238
1238
val distLocation = (dist / pack).value
1239
1239
val projectVersion = version.value
@@ -1262,20 +1262,10 @@ object Build {
1262
1262
s " -source-links:github://lampepfl/dotty/ $referenceVersion" ,
1263
1263
) ++ scalacOptionsDocSettings ++ revision ++ params ++ targets
1264
1264
import _root_ .scala .sys .process ._
1265
- if (usingScript)
1266
- Def .task((s " $distLocation/bin/scaladoc " +: cmd).! )
1267
- else {
1268
- val escapedCmd = cmd.map(arg => if (arg.contains(" " )) s """ " $arg" """ else arg)
1269
- Def .task {
1270
- try {
1271
- (Compile / run).toTask(escapedCmd.mkString(" " , " " , " " )).value
1272
- 0
1273
- } catch {
1274
- case _ : Throwable => 1
1275
- }
1276
- }
1265
+ val escapedCmd = cmd.map(arg => if (arg.contains(" " )) s """ " $arg" """ else arg)
1266
+ Def .task {
1267
+ (Compile / run).toTask(escapedCmd.mkString(" " , " " , " " )).value
1277
1268
}
1278
-
1279
1269
}
1280
1270
1281
1271
val SourceLinksIntegrationTest = config(" sourceLinksIntegrationTest" ) extend Test
@@ -1322,7 +1312,7 @@ object Build {
1322
1312
generateSelfDocumentation := Def .taskDyn {
1323
1313
generateDocumentation(
1324
1314
(Compile / classDirectory).value.getAbsolutePath :: Nil ,
1325
- " scaladoc" , " scaladoc/output/self" , VersionUtil .gitHash
1315
+ " scaladoc" , " scaladoc/output/self" , VersionUtil .gitHash, Seq ( " -usejavacp " )
1326
1316
)
1327
1317
}.value,
1328
1318
generateScalaDocumentation := Def .inputTaskDyn {
@@ -1363,16 +1353,16 @@ object Build {
1363
1353
s " -source-links:docs=github://lampepfl/dotty/master#docs " ,
1364
1354
" -doc-root-content" , docRootFile.toString,
1365
1355
" -Ydocument-synthetic-types"
1366
- ), usingScript = false
1367
- ))
1356
+ )))
1368
1357
}.evaluated,
1369
1358
1370
1359
generateTestcasesDocumentation := Def .taskDyn {
1371
1360
generateDocumentation(
1372
1361
(Test / Build .testcasesOutputDir).value,
1373
1362
" scaladoc testcases" ,
1374
1363
" scaladoc/output/testcases" ,
1375
- " master"
1364
+ " master" ,
1365
+ Seq (" -usejavacp" )
1376
1366
)
1377
1367
}.value,
1378
1368
0 commit comments