Skip to content

Commit a0e78aa

Browse files
committed
Add scaladoc interface stub
1 parent 2317b9b commit a0e78aa

File tree

5 files changed

+38
-2
lines changed

5 files changed

+38
-2
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* sbt -- Simple Build Tool
2+
* Copyright 2008, 2009 Mark Harrah
3+
*/
4+
package xsbt
5+
6+
import xsbti.Logger
7+
import dotty.tools.dottydoc.api.scala.Dottydoc
8+
9+
class ScaladocInterface {
10+
def run(args: Array[String], log: Logger, delegate: xsbti.Reporter) =
11+
(new DottydocRunner(args, log, delegate)).run()
12+
}
13+
14+
class DottydocRunner(args: Array[String], log: Logger, delegate: xsbti.Reporter) extends Dottydoc {
15+
def run(): Unit = {
16+
println(args.mkString("Args = List (\n ",",\n ",")"))
17+
//val index = createIndex(args)
18+
//buildDocs(outputDir, templatePath, resources, index)
19+
}
20+
}

dottydoc/src/dotty/tools/dottydoc/interface/Dottydoc.java renamed to dottydoc/src/dotty/tools/dottydoc/api/java/Dottydoc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.tools.dottydoc.java;
1+
package dotty.tools.dottydoc.api.java;
22

33
import dotty.tools.dottydoc.DottyDocDriver;
44
import dotty.tools.dottydoc.model.Package;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package dotty.tools.dottydoc.api.scala
2+
3+
import dotty.tools.dottydoc.DottyDocDriver
4+
import dotty.tools.dottydoc.model.Package
5+
import dotty.tools.dottydoc.util.OutputWriter
6+
7+
import scala.collection.Map
8+
9+
trait Dottydoc extends DottyDocDriver {
10+
def createIndex(args: Array[String]): Map[String, Package] =
11+
compiledDocs(args)
12+
13+
def buildDocs(outDir: String, templatePath: String, resources: List[String], index: Map[String, Package]) =
14+
new OutputWriter().write(index, templatePath, outDir, resources)
15+
}

dottydoc/test/WhitelistedStdLibMain.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package dottydoc
33

44
import scala.io.Source
55

6-
object WhitelistedStandardLib extends dottydoc.java.Dottydoc {
6+
object WhitelistedStandardLib extends dottydoc.api.java.Dottydoc {
77
import scala.collection.JavaConverters._
88

99
val files: List[String] = {

project/Build.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ object DottyBuild extends Build {
206206

207207
lazy val `dotty-bridge` = project.in(file("bridge")).
208208
dependsOn(dotty).
209+
dependsOn(dottydoc).
209210
settings(
210211
overrideScalaVersionSetting,
211212

0 commit comments

Comments
 (0)