File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ object DottyBuild extends Build {
56
56
// Compiles the documentation and static site
57
57
lazy val genDocs = inputKey[Unit ](" run dottydoc to generate static documentation site" )
58
58
59
+ // Shorthand for compiling a docs site
60
+ lazy val dottydoc = inputKey[Unit ](" run dottydoc" )
61
+
59
62
/** Dottydoc deps */
60
63
lazy val dottydocDeps = SettingKey [Seq [ModuleID ]](
61
64
" dottydocDeps" ,
@@ -273,6 +276,15 @@ object DottyBuild extends Build {
273
276
)
274
277
}.evaluated,
275
278
279
+ dottydoc := Def .inputTaskDyn {
280
+ val args : Seq [String ] = spaceDelimited(" <arg>" ).parsed
281
+ val dottyLib = packageAll.value(" dotty-library" )
282
+ val dottyInterfaces = packageAll.value(" dotty-interfaces" )
283
+ val otherDeps = (dependencyClasspath in Compile ).value.map(_.data).mkString(" :" )
284
+ val cp : Seq [String ] = Seq (" -classpath" , s " $dottyLib: $dottyInterfaces: $otherDeps" )
285
+ (runMain in Compile ).toTask(s """ dotty.tools.dottydoc.Main ${cp.mkString(" " )} """ + args.mkString(" " ))
286
+ }.evaluated,
287
+
276
288
// Override run to be able to run compiled classfiles
277
289
dotr := {
278
290
val args : Seq [String ] = spaceDelimited(" <arg>" ).parsed
You can’t perform that action at this time.
0 commit comments