@@ -1241,7 +1241,7 @@ object Build {
1241
1241
libraryDependencies += (" org.scala-js" %%% " scalajs-dom" % " 1.1.0" ).cross(CrossVersion .for3Use2_13)
1242
1242
)
1243
1243
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 ) =
1245
1245
Def .taskDyn {
1246
1246
val distLocation = (dist / pack).value
1247
1247
val projectVersion = version.value
@@ -1265,20 +1265,10 @@ object Build {
1265
1265
s " -source-links:github://lampepfl/dotty/ $referenceVersion" ,
1266
1266
) ++ scalacOptionsDocSettings ++ revision ++ params ++ targets
1267
1267
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
1280
1271
}
1281
-
1282
1272
}
1283
1273
1284
1274
val SourceLinksIntegrationTest = config(" sourceLinksIntegrationTest" ) extend Test
@@ -1325,7 +1315,7 @@ object Build {
1325
1315
generateSelfDocumentation := Def .taskDyn {
1326
1316
generateDocumentation(
1327
1317
(Compile / classDirectory).value.getAbsolutePath :: Nil ,
1328
- " scaladoc" , " scaladoc/output/self" , VersionUtil .gitHash
1318
+ " scaladoc" , " scaladoc/output/self" , VersionUtil .gitHash, Seq ( " -usejavacp " )
1329
1319
)
1330
1320
}.value,
1331
1321
generateScalaDocumentation := Def .inputTaskDyn {
@@ -1366,16 +1356,16 @@ object Build {
1366
1356
s " -source-links:docs=github://lampepfl/dotty/master#docs " ,
1367
1357
" -doc-root-content" , docRootFile.toString,
1368
1358
" -Ydocument-synthetic-types"
1369
- ), usingScript = false
1370
- ))
1359
+ )))
1371
1360
}.evaluated,
1372
1361
1373
1362
generateTestcasesDocumentation := Def .taskDyn {
1374
1363
generateDocumentation(
1375
1364
(Test / Build .testcasesOutputDir).value,
1376
1365
" scaladoc testcases" ,
1377
1366
" scaladoc/output/testcases" ,
1378
- " master"
1367
+ " master" ,
1368
+ Seq (" -usejavacp" )
1379
1369
)
1380
1370
}.value,
1381
1371
0 commit comments