@@ -345,6 +345,13 @@ object Build {
345
345
javacOptions in (Compile , doc) --= Seq (" -Xlint:unchecked" , " -Xlint:deprecation" )
346
346
)
347
347
348
+ private lazy val dottydocClasspath = Def .task {
349
+ val dottyLib = (packageAll in `dotty-compiler`).value(" dotty-library" )
350
+ val dottyInterfaces = (packageAll in `dotty-compiler`).value(" dotty-interfaces" )
351
+ val otherDeps = (dependencyClasspath in Compile ).value.map(_.data).mkString(File .pathSeparator)
352
+ dottyLib + File .pathSeparator + dottyInterfaces + File .pathSeparator + otherDeps
353
+ }
354
+
348
355
// Settings shared between dotty-doc and dotty-doc-bootstrapped
349
356
lazy val dottyDocSettings = Seq (
350
357
baseDirectory in (Compile , run) := baseDirectory.value / " .." ,
@@ -363,10 +370,7 @@ object Build {
363
370
// Used by sbt-dotty to resolve the latest nightly
364
371
val majorVersion = baseVersion.take(baseVersion.lastIndexOf('.' ))
365
372
IO .write(file(" ./docs/_site/versions/latest-nightly-base" ), majorVersion)
366
-
367
- val dottyLib = (packageAll in `dotty-compiler`).value(" dotty-library" )
368
- val dottyInterfaces = (packageAll in `dotty-compiler`).value(" dotty-interfaces" )
369
- val otherDeps = (dependencyClasspath in Compile ).value.map(_.data).mkString(" :" )
373
+
370
374
val sources =
371
375
(unmanagedSources in (Compile , compile)).value ++
372
376
(unmanagedSources in (`dotty-compiler`, Compile )).value
@@ -375,7 +379,7 @@ object Build {
375
379
" -project" , " Dotty" ,
376
380
" -project-version" , dottyVersion,
377
381
" -project-url" , dottyGithubUrl,
378
- " -classpath" , s " $dottyLib : $dottyInterfaces : $otherDeps "
382
+ " -classpath" , dottydocClasspath.value
379
383
)
380
384
(runMain in Compile ).toTask(
381
385
s """ dotty.tools.dottydoc.Main ${args.mkString(" " )} ${sources.mkString(" " )}"""
@@ -384,10 +388,7 @@ object Build {
384
388
385
389
dottydoc := Def .inputTaskDyn {
386
390
val args : Seq [String ] = spaceDelimited(" <arg>" ).parsed
387
- val dottyLib = (packageAll in `dotty-compiler`).value(" dotty-library" )
388
- val dottyInterfaces = (packageAll in `dotty-compiler`).value(" dotty-interfaces" )
389
- val otherDeps = (dependencyClasspath in Compile ).value.map(_.data).mkString(" :" )
390
- val cp : Seq [String ] = Seq (" -classpath" , s " $dottyLib: $dottyInterfaces: $otherDeps" )
391
+ val cp : Seq [String ] = Seq (" -classpath" , dottydocClasspath.value)
391
392
(runMain in Compile ).toTask(s """ dotty.tools.dottydoc.Main ${cp.mkString(" " )} """ + args.mkString(" " ))
392
393
}.evaluated,
393
394
0 commit comments