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