@@ -277,10 +277,7 @@ object Build {
277277 )
278278
279279 // 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 (
284281 unmanagedSourceDirectories in Compile += baseDirectory.value / " src-bootstrapped" ,
285282
286283 version := dottyVersion,
@@ -339,6 +336,8 @@ object Build {
339336
340337 // sbt-dotty defines `scalaInstance in doc` so we need to override it manually
341338 scalaInstance in doc := scalaInstance.value,
339+
340+ disableDocSetting,
342341 )
343342
344343 lazy val commonBenchmarkSettings = Seq (
@@ -1166,7 +1165,7 @@ object Build {
11661165
11671166 val testcasesOutputDir = taskKey[String ](" Root directory where tests classses are generated" )
11681167 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" )
11701169 val generateScala3Documentation = taskKey[Unit ](" Generate documentation for dotty lib" )
11711170 val generateTestcasesDocumentation = taskKey[Unit ](" Generate documentation for testcases, usefull for debugging tests" )
11721171 lazy val `scala3doc` = project.in(file(" scala3doc" )).asScala3doc
@@ -1462,19 +1461,18 @@ object Build {
14621461 def asScala3doc : Project = {
14631462 def generateDocumentation (targets : String , name : String , outDir : String , params : String = " " ) = Def .taskDyn {
14641463 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""" )
14661465 }
14671466
14681467 project.settings(commonBootstrappedSettings).
14691468 dependsOn(`scala3-compiler-bootstrapped`).
14701469 dependsOn(`scala3-tasty-inspector`).
14711470 settings(
1471+ // Needed to download dokka and its dependencies
14721472 resolvers += Resolver .jcenterRepo,
1473- resolvers += Resolver .bintrayRepo( " kotlin " , " kotlin-dev " ),
1473+ // Needed to download dokka-site
14741474 resolvers += Resolver .bintrayRepo(" virtuslab" , " dokka" ),
14751475 libraryDependencies ++= Seq (
1476- " org.scala-lang" %% " scala3-tasty-inspector" % scalaVersion.value,
1477-
14781476 " com.virtuslab.dokka" % " dokka-site" % " 0.1.9" ,
14791477 " com.vladsch.flexmark" % " flexmark-all" % " 0.42.12" ,
14801478 " nl.big-o" % " liqp" % " 0.6.7" ,
@@ -1483,17 +1481,15 @@ object Build {
14831481 " org.jetbrains.dokka" % " dokka-test-api" % " 1.4.10.2" % " test" ,
14841482 " com.novocode" % " junit-interface" % " 0.11" % " test" ,
14851483 ),
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,
14871485 testcasesOutputDir.in(Test ) := classDirectory.in(Compile ).in(`scala3doc-testcases`).value.getAbsolutePath.toString,
14881486 testcasesSourceRoot.in(Test ) := (baseDirectory.in(`scala3doc-testcases`).value / " src" ).getAbsolutePath.toString,
1489- fork.in(run) := true ,
14901487 Compile / mainClass := Some (" dotty.dokka.Main" ),
14911488 // There is a bug in dokka that prevents parallel tests withing the same jvm
14921489 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,
14971493 generateScala3Documentation := Def .taskDyn {
14981494 val dottyJars = Seq (
14991495 // All projects below will be used to generated documentation for Scala 3
@@ -1505,8 +1501,8 @@ object Build {
15051501 )
15061502 val roots = dottyJars.map(_.toString).mkString(java.io.File .pathSeparator)
15071503
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" )
15101506 }.value,
15111507 generateTestcasesDocumentation := Def .taskDyn {
15121508 generateDocumentation(Build .testcasesOutputDir.in(Test ).value, " Scala3doc testcases" , " testcases" )
0 commit comments