Skip to content

Commit 6d5f442

Browse files
committed
.
1 parent 83a00c9 commit 6d5f442

File tree

86 files changed

+193
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+193
-142
lines changed

build.mill

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ object Deps {
148148
val junitInterface = ivy"com.github.sbt:junit-interface:0.13.3"
149149
val commonsIo = ivy"commons-io:commons-io:2.18.0"
150150
val log4j2Core = ivy"org.apache.logging.log4j:log4j-core:2.24.3"
151-
val osLib = ivy"com.lihaoyi::os-lib:0.11.4-M5"
151+
val osLib = ivy"com.lihaoyi::os-lib:0.11.4-M6"
152152
val pprint = ivy"com.lihaoyi::pprint:0.9.0"
153153
val mainargs = ivy"com.lihaoyi::mainargs:0.7.6"
154154
val millModuledefsVersion = "0.11.2"
@@ -381,7 +381,7 @@ trait MillJavaModule extends JavaModule {
381381

382382
def writeLocalTestOverrides = Task.Anon {
383383
for ((k, v) <- testTransitiveDeps()) {
384-
os.write(Task.dest / "mill" / "local-test-overrides" / k, v, createFolders = true)
384+
os.write(Task.dest / "mill/local-test-overrides" / k, v, createFolders = true)
385385
}
386386
Seq(PathRef(Task.dest))
387387
}

changelog.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ or `;exclude=org:*` or `;exclude=*:name` {link-pr}/3492[#3492]
450450

451451
* Update to https://github.com/com-lihaoyi/os-lib?tab=readme-ov-file#0-10-7[OS-Lib 0.10.7] to
452452
allow concise multi-segment sub-paths; you can now write `os.pwd / "foo/bar/qux"` rather than
453-
`os.pwd / "foo" / "bar" / "qux"`
453+
`os.pwd / "foo/bar/qux"`
454454

455455
* Add `JavaModule.mandatoryJavacOptions`. Those are not propagated to the inner test
456456
traits intentionally, since those options are typically configured by other means,

contrib/playlib/src/mill/playlib/Layout.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import mill.scalalib._
55

66
private[playlib] trait Layout extends JavaModule {
77

8-
def conf = Task.Sources { millSourcePath / "conf" }
9-
def app = Task.Sources { millSourcePath / "app" }
8+
def conf = Task.Sources { "conf" }
9+
def app = Task.Sources { "app" }
1010

1111
override def sources = Task { app() }
1212
override def resources = Task { conf() }

contrib/playlib/src/mill/playlib/RouterModule.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import mill.{Agg, T, Task}
99

1010
trait RouterModule extends ScalaModule with Version {
1111

12-
def routes: T[Seq[PathRef]] = Task.Sources { millSourcePath / "routes" }
12+
def routes: T[Seq[PathRef]] = Task.Sources { "routes" }
1313

1414
def routeFiles = Task {
1515
val paths = routes().flatMap(file => os.walk(file.path))

contrib/versionfile/src/mill/contrib/versionfile/VersionFileModule.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import mill._
55
trait VersionFileModule extends Module {
66

77
/** The file containing the current version. */
8-
def versionFile: T[PathRef] = Task.Source(millSourcePath / "version")
8+
def versionFile: T[PathRef] = Task.Source("version")
99

1010
/** The current version. */
1111
def currentVersion: T[Version] = Task { Version.of(os.read(versionFile().path).trim) }

dist/package.mill

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ trait InstallModule extends build.MillPublishJavaModule {
4141
def installLocalCache() = Task.Command {
4242
val path = installLocalTask(
4343
Task.Anon(
44-
(os.home / ".cache" / "mill" / "download" / (build.millVersion() + batExt)).toString()
44+
(os.home / ".cache/mill/download" / (build.millVersion() + batExt)).toString()
4545
)
4646
)()
4747
Task.log.outputStream.println(path.toString())

docs/modules/ROOT/pages/comparisons/maven.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ import $ivy.`ant:ant-optional:1.5.3-1`
391391

392392
object common extends NettyModule{
393393
...
394-
def script = Task.Source(millSourcePath / "src" / "main" / "script")
394+
def script = Task.Source("src/main/script")
395395
def generatedSources0 = Task {
396396
val shell = new groovy.lang.GroovyShell()
397397
val context = new java.util.HashMap[String, Object]
@@ -520,8 +520,8 @@ with the `make` command essentially being a bash script wrapped in layers of XML
520520
In contrast, the Mill configuration for this logic is as follows:
521521

522522
```scala
523-
def makefile = Task.Source(millSourcePath / "Makefile")
524-
def cSources = Task.Source(millSourcePath / "src" / "main" / "c")
523+
def makefile = Task.Source("Makefile")
524+
def cSources = Task.Source("src/main/c")
525525
def cHeaders = Task {
526526
for(p <- os.walk(cSources().path) if p.ext == "h"){
527527
os.copy(p, Task.dest / p.relativeTo(cSources().path), createFolders = true)
@@ -531,14 +531,14 @@ def cHeaders = Task {
531531

532532
def make = Task {
533533
os.copy(makefile().path, Task.dest / "Makefile")
534-
os.copy(cSources().path, Task.dest / "src" / "main" / "c", createFolders = true)
534+
os.copy(cSources().path, Task.dest / "src/main/c", createFolders = true)
535535

536536
val Seq(sourceJar) = resolveDeps(
537537
deps = Task.Anon(Agg(ivy"io.netty:netty-jni-util:0.0.9.Final").map(bindDependency())),
538538
sources = true
539539
)().toSeq
540540

541-
os.proc("jar", "xf", sourceJar.path).call(cwd = Task.dest / "src" / "main" / "c")
541+
os.proc("jar", "xf", sourceJar.path).call(cwd = Task.dest / "src/main/c")
542542

543543
os.proc("make").call(
544544
cwd = Task.dest,

docs/modules/ROOT/pages/comparisons/unique.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ them into classfiles, and then the `jar` executable to package them together int
176176
```scala
177177
def mainClass: T[Option[String]] = Some("foo.Foo")
178178

179-
def sources = Task.Source(millSourcePath / "src")
180-
def resources = Task.Source(millSourcePath / "resources")
179+
def sources = Task.Source("src")
180+
def resources = Task.Source("resources")
181181

182182
def compile = Task {
183183
val allSources = os.walk(sources().path)

docs/package.mill

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ object `package` extends RootModule {
6161
envArgs = Map("CI" -> "true"),
6262
workingDir = workDir
6363
)
64-
PathRef(workDir / "build" / "site")
64+
PathRef(workDir / "build/site")
6565
}
6666

6767
def source0 = Task.Source(millSourcePath)
6868
def projectChangelog = Task.Source(Task.workspace / "changelog.adoc")
6969
def source = Task {
7070
os.copy(source0().path, Task.dest, mergeFolders = true)
7171

72-
val pagesWd = Task.dest / "modules" / "ROOT" / "pages"
73-
val partialsWd = Task.dest / "modules" / "ROOT" / "partials"
72+
val pagesWd = Task.dest / "modules/ROOT/pages"
73+
val partialsWd = Task.dest / "modules/ROOT/partials"
7474

7575
os.copy(projectChangelog().path, partialsWd / "project-changelog.adoc", createFolders = true)
7676

@@ -284,7 +284,7 @@ object `package` extends RootModule {
284284
val checkout = Task.dest / displayVersion
285285
os.proc("git", "clone", Task.workspace / ".git", checkout).call(stdout = os.Inherit)
286286
os.proc("git", "checkout", millLastTag).call(cwd = checkout, stdout = os.Inherit)
287-
val outputFolder = checkout / "out" / "docs" / "source.dest"
287+
val outputFolder = checkout / "out/docs/source.dest"
288288
os.proc("./mill", "-i", "docs.source").call(cwd = checkout, stdout = os.Inherit)
289289
expandDiagramsInDirectoryAdocFile(
290290
outputFolder,
@@ -360,7 +360,7 @@ object `package` extends RootModule {
360360
// only copy the "api" sub-dir; api docs contains a top-level index.html with we don't want
361361
val unidocSrc = if (authorMode) site.unidocLocal().path else site.unidocSite().path
362362
Task.log.errorStream.println(s"Copying API docs from ${unidocSrc} ...")
363-
os.copy(unidocSrc, siteDir / "api" / "latest", createFolders = true)
363+
os.copy(unidocSrc, siteDir / "api/latest", createFolders = true)
364364

365365
PathRef(siteDir)
366366
}

example/extending/jvmcode/1-subprocess/build.mill

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object foo extends JavaModule {
2222
defaultResolver().resolveDeps(Agg(ivy"org.codehaus.groovy:groovy:3.0.9"))
2323
}
2424

25-
def groovyScript = Task.Source(millSourcePath / "generate.groovy")
25+
def groovyScript = Task.Source("generate.groovy")
2626

2727
def groovyGeneratedResources = Task {
2828
Jvm.runSubprocess(

0 commit comments

Comments
 (0)