@@ -28,6 +28,8 @@ object `package` extends RootModule with SbtModule with HasScalaPlugin with HasC
28
28
29
29
override def moduleDeps = Seq(chisel(v.scalaVersion))
30
30
31
+ override def mainClass = Task(Some("mdoc.Main"))
32
+
31
33
// Suppress missing interpolator warnings because mdoc appears to introduce them.
32
34
override def extraWarnConf = Seq("msg=possible missing interpolator:s")
33
35
@@ -77,22 +79,24 @@ object `package` extends RootModule with SbtModule with HasScalaPlugin with HasC
77
79
super.generatedSources() :+ firtoolVersionsTable()
78
80
}
79
81
80
- def mdoc = T {
82
+ def mdocArgs = Task.Anon {
81
83
val classpath = runClasspath().map(_.path)
82
84
val outDir = mdocOutDir()
83
-
84
85
val inOutArgs =
85
86
mdocSources().flatMap(inDir => Seq[String]("--in", inDir.path.toString, "--out", outDir.toString))
86
- val mdocArgs =
87
- Seq("--classpath", classpath.mkString(":")) ++
88
- Seq("--scalac-options", scalacOptions().map("\"" + _ + "\"").mkString(" ")) ++
89
- inOutArgs ++ mdocExtraArguments()
90
87
91
- T.log.debug("Running mdoc with args: " + mdocArgs.mkString(" "))
88
+ val args = Seq("--classpath", classpath.mkString(":")) ++
89
+ Seq("--scalac-options", scalacOptions().map("\"" + _ + "\"").mkString(" ")) ++
90
+ inOutArgs ++ mdocExtraArguments()
92
91
93
- Jvm.runLocal("mdoc.Main", classpath, mdocArgs)
92
+ T.log.debug("Running mdoc with args: " + args.mkString(" "))
93
+
94
+ Args(args)
95
+ }
94
96
95
- PathRef(outDir)
97
+ def mdoc = Task {
98
+ runLocal(mdocArgs)()
99
+ PathRef(mdocOutDir())
96
100
}
97
101
98
102
def contributors = Task {
0 commit comments