@@ -277,10 +277,7 @@ object Build {
277
277
)
278
278
279
279
// Settings used when compiling dotty with a non-bootstrapped dotty
280
- lazy val commonBootstrappedSettings = commonBootstrappedSettings0 ++ Seq (
281
- disableDocSetting,
282
- )
283
- lazy val commonBootstrappedSettings0 = commonDottySettings ++ Seq (
280
+ lazy val commonBootstrappedSettings = commonDottySettings ++ Seq (
284
281
unmanagedSourceDirectories in Compile += baseDirectory.value / " src-bootstrapped" ,
285
282
286
283
version := dottyVersion,
@@ -339,6 +336,8 @@ object Build {
339
336
340
337
// sbt-dotty defines `scalaInstance in doc` so we need to override it manually
341
338
scalaInstance in doc := scalaInstance.value,
339
+
340
+ disableDocSetting,
342
341
)
343
342
344
343
lazy val commonBenchmarkSettings = Seq (
@@ -1166,7 +1165,7 @@ object Build {
1166
1165
1167
1166
val testcasesOutputDir = taskKey[String ](" Root directory where tests classses are generated" )
1168
1167
val testcasesSourceRoot = taskKey[String ](" Root directory where tests sources are generated" )
1169
- val generateSelfDocumentation = inputKey [Unit ](" Generate example documentation" )
1168
+ val generateSelfDocumentation = taskKey [Unit ](" Generate example documentation" )
1170
1169
val generateScala3Documentation = taskKey[Unit ](" Generate documentation for dotty lib" )
1171
1170
val generateTestcasesDocumentation = taskKey[Unit ](" Generate documentation for testcases, usefull for debugging tests" )
1172
1171
lazy val `scala3doc` = project.in(file(" scala3doc" )).asScala3doc
@@ -1462,19 +1461,18 @@ object Build {
1462
1461
def asScala3doc : Project = {
1463
1462
def generateDocumentation (targets : String , name : String , outDir : String , params : String = " " ) = Def .taskDyn {
1464
1463
val sourceMapping = " =https://github.com/lampepfl/dotty/tree/master#L"
1465
- run.in(Compile ).toTask(s """ -o output/ $outDir -t $targets -n " $name" -s $sourceMapping $params""" )
1464
+ run.in(Compile ).toTask(s """ -d output/ $outDir -t $targets -n " $name" -s $sourceMapping $params""" )
1466
1465
}
1467
1466
1468
1467
project.settings(commonBootstrappedSettings).
1469
1468
dependsOn(`scala3-compiler-bootstrapped`).
1470
1469
dependsOn(`scala3-tasty-inspector`).
1471
1470
settings(
1471
+ // Needed to download dokka and its dependencies
1472
1472
resolvers += Resolver .jcenterRepo,
1473
- resolvers += Resolver .bintrayRepo( " kotlin " , " kotlin-dev " ),
1473
+ // Needed to download dokka-site
1474
1474
resolvers += Resolver .bintrayRepo(" virtuslab" , " dokka" ),
1475
1475
libraryDependencies ++= Seq (
1476
- " org.scala-lang" %% " scala3-tasty-inspector" % scalaVersion.value,
1477
-
1478
1476
" com.virtuslab.dokka" % " dokka-site" % " 0.1.9" ,
1479
1477
" com.vladsch.flexmark" % " flexmark-all" % " 0.42.12" ,
1480
1478
" nl.big-o" % " liqp" % " 0.6.7" ,
@@ -1483,17 +1481,15 @@ object Build {
1483
1481
" org.jetbrains.dokka" % " dokka-test-api" % " 1.4.10.2" % " test" ,
1484
1482
" com.novocode" % " junit-interface" % " 0.11" % " test" ,
1485
1483
),
1486
- test.in( Test ) := test.in (Test ).dependsOn(compile.in(Compile ).in(`scala3doc-testcases`)).value,
1484
+ Test / test := (Test / test ).dependsOn(compile.in(Compile ).in(`scala3doc-testcases`)).value,
1487
1485
testcasesOutputDir.in(Test ) := classDirectory.in(Compile ).in(`scala3doc-testcases`).value.getAbsolutePath.toString,
1488
1486
testcasesSourceRoot.in(Test ) := (baseDirectory.in(`scala3doc-testcases`).value / " src" ).getAbsolutePath.toString,
1489
- fork.in(run) := true ,
1490
1487
Compile / mainClass := Some (" dotty.dokka.Main" ),
1491
1488
// There is a bug in dokka that prevents parallel tests withing the same jvm
1492
1489
fork.in(test) := true ,
1493
- Test / parallelExecution := false ,
1494
- generateSelfDocumentation := Def .inputTaskDyn {
1495
- generateDocumentation(classDirectory.in(Compile ).value.getAbsolutePath, " scala3doc" , " self" , " -d documentation" )
1496
- }.evaluated,
1490
+ generateSelfDocumentation := Def .taskDyn {
1491
+ generateDocumentation(classDirectory.in(Compile ).value.getAbsolutePath, " scala3doc" , " self" , " -p documentation" )
1492
+ }.value,
1497
1493
generateScala3Documentation := Def .taskDyn {
1498
1494
val dottyJars = Seq (
1499
1495
// All projects below will be used to generated documentation for Scala 3
@@ -1505,8 +1501,8 @@ object Build {
1505
1501
)
1506
1502
val roots = dottyJars.map(_.toString).mkString(java.io.File .pathSeparator)
1507
1503
1508
- if (dottyJars.isEmpty) Def .task { streams.value.log.error(" Dotty lib wasn't found" ) }
1509
- else generateDocumentation(roots, " Scala 3" , " stdLib" , " -d dotty-docs/docs" )
1504
+ if (dottyJars.isEmpty) Def .task { streams.value.log.error(" Dotty lib wasn't found" ) }
1505
+ else generateDocumentation(roots, " Scala 3" , " stdLib" , " -p dotty-docs/docs" )
1510
1506
}.value,
1511
1507
generateTestcasesDocumentation := Def .taskDyn {
1512
1508
generateDocumentation(Build .testcasesOutputDir.in(Test ).value, " Scala3doc testcases" , " testcases" )
0 commit comments