Skip to content

Commit ffb940b

Browse files
authored
build: bump to mill 0.12.10 (#4876)
Signed-off-by: unlsycn <[email protected]>
1 parent 41db704 commit ffb940b

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

.mill-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.12.7
1+
0.12.10

docs/package.mill

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ object `package` extends RootModule with SbtModule with HasScalaPlugin with HasC
2828

2929
override def moduleDeps = Seq(chisel(v.scalaVersion))
3030

31+
override def mainClass = Task(Some("mdoc.Main"))
32+
3133
// Suppress missing interpolator warnings because mdoc appears to introduce them.
3234
override def extraWarnConf = Seq("msg=possible missing interpolator:s")
3335

@@ -77,22 +79,24 @@ object `package` extends RootModule with SbtModule with HasScalaPlugin with HasC
7779
super.generatedSources() :+ firtoolVersionsTable()
7880
}
7981

80-
def mdoc = T {
82+
def mdocArgs = Task.Anon {
8183
val classpath = runClasspath().map(_.path)
8284
val outDir = mdocOutDir()
83-
8485
val inOutArgs =
8586
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()
9087

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()
9291

93-
Jvm.runLocal("mdoc.Main", classpath, mdocArgs)
92+
T.log.debug("Running mdoc with args: " + args.mkString(" "))
93+
94+
Args(args)
95+
}
9496

95-
PathRef(outDir)
97+
def mdoc = Task {
98+
runLocal(mdocArgs)()
99+
PathRef(mdocOutDir())
96100
}
97101

98102
def contributors = Task {

release.mill

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,15 @@ trait Unipublish extends ScalaModule with ChiselPublishModule {
5353
override def artifactName = "chisel"
5454

5555
/** Publish both this project and the plugin (for the default Scala version) */
56-
override def publishLocal(localIvyRepo: String = null) = Task.Command {
56+
override def publishLocal(
57+
localIvyRepo: String = null,
58+
sources: Boolean = true,
59+
doc: Boolean = true,
60+
transitive: Boolean = false
61+
) = Task.Command {
5762
// TODO consider making this parallel and publishing all cross-versions for plugin
5863
plugin.cross(v.scalaVersion).publishLocal(localIvyRepo)()
59-
super.publishLocal(localIvyRepo)()
64+
super.publishLocal(localIvyRepo, sources, doc, transitive)()
6065
}
6166

6267
// Explicitly not using moduleDeps because that influences so many things

0 commit comments

Comments
 (0)