Skip to content

Commit a0bad84

Browse files
authored
Documentation Review (#5477)
1 parent eee39ea commit a0bad84

File tree

74 files changed

+413
-333
lines changed

Some content is hidden

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

74 files changed

+413
-333
lines changed

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 { "conf" }
9-
def app = Task.Sources { "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/PlayModule.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ trait PlayApiModule extends Dependencies with Router with Server {
1818
}
1919
Seq(mvn"org.scalatestplus.play::scalatestplus-play::${scalatestPlusPlayVersion}")
2020
}
21-
override def sources: T[Seq[PathRef]] = Task.Sources { moduleDir }
21+
override def sources: T[Seq[PathRef]] = Task.Sources(moduleDir)
2222
}
2323

2424
def start(args: Task[Args] = Task.Anon(Args())) = Task.Command { run(args)() }

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

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

99
trait RouterModule extends ScalaModule with Version {
1010

11-
def routes: T[Seq[PathRef]] = Task.Sources { "routes" }
11+
def routes: T[Seq[PathRef]] = Task.Sources("routes")
1212

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

contrib/playlib/src/mill/playlib/Static.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait Static extends ScalaModule {
2525
/**
2626
* Directories to include assets from
2727
*/
28-
def assetSources = Task.Sources { os.sub / "public" }
28+
def assetSources = Task.Sources("public")
2929

3030
/*
3131
Collected static assets for the project

contrib/scalapblib/src/mill/contrib/scalapblib/ScalaPBModule.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ trait ScalaPBModule extends ScalaModule {
5252

5353
def scalaPBProtocPath: T[Option[String]] = Task { None }
5454

55-
def scalaPBSources: T[Seq[PathRef]] = Task.Sources {
56-
moduleDir / "protobuf"
57-
}
55+
def scalaPBSources: T[Seq[PathRef]] = Task.Sources("protobuf")
5856

5957
def scalaPBOptions: T[String] = Task {
6058
(

contrib/scalapblib/test/src/mill/contrib/scalapblib/TutorialTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ object TutorialTests extends TestSuite {
5151

5252
object TutorialWithSpecificSources extends TutorialBase {
5353
object core extends TutorialModule {
54-
override def scalaPBSources: T[Seq[PathRef]] = Task.Sources {
55-
moduleDir / "protobuf/tutorial/Tutorial.proto"
56-
}
54+
override def scalaPBSources: T[Seq[PathRef]] = Task.Sources(
55+
"protobuf/tutorial/Tutorial.proto"
56+
)
5757

5858
override def scalaPBSearchDeps = true
5959
override def scalaPBIncludePath = Task.Sources(

contrib/twirllib/src/mill/twirllib/TwirlModule.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ trait TwirlModule extends mill.Module { twirlModule =>
2828
}
2929
}
3030

31-
def twirlSources: T[Seq[PathRef]] = Task.Sources {
32-
moduleDir / "views"
33-
}
31+
def twirlSources: T[Seq[PathRef]] = Task.Sources("views")
3432

3533
/**
3634
* Replicate the logic from twirl build,

core/exec/test/src/mill/exec/ExecutionTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ object ExecutionTests extends TestSuite {
3434
}
3535

3636
object sourceBuild extends TestRootModule {
37-
def source = Task.Source { "hello/world.txt" }
37+
def source = Task.Source("hello/world.txt")
3838
def task = Task { os.read(source().path) + " !" }
3939
lazy val millDiscover = Discover[this.type]
4040
}

core/exec/test/src/mill/exec/JavaCompileJarTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ object JavaCompileJarTests extends TestSuite {
3737
// resourceRoot ----> jar
3838
// ^
3939
// readmePath---------- |
40-
def readme = Task.Source { readmePath }
41-
def sourceRoot = Task.Sources { sourceRootPath }
42-
def resourceRoot = Task.Sources { resourceRootPath }
40+
def readme = Task.Source(readmePath)
41+
def sourceRoot = Task.Sources(sourceRootPath)
42+
def resourceRoot = Task.Sources(resourceRootPath)
4343
def allSources =
4444
Task { sourceRoot().flatMap(p => os.walk(p.path)).map(PathRef(_)) }
4545
def classFiles = Task { compileAll(allSources()) }

example/androidlib/java/3-linting/build.mill

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ object app extends AndroidAppModule {
2626
def androidApplicationNamespace = "com.helloworld.app"
2727

2828
// Set path to the custom `lint.xml` config file. It is usually at the root of the project
29-
def androidLintConfigPath0 = Task.Sources { "lint.xml" }
29+
def androidLintConfigPath0 = Task.Sources("lint.xml")
3030
def androidLintConfigPath = Task { androidLintConfigPath0().headOption }
3131

3232
// Set path to the custom `baseline.xml` file. It is usually at the root of the project
33-
def androidLintBaselinePath0 = Task.Sources { "lint-baseline.xml" }
33+
def androidLintBaselinePath0 = Task.Sources("lint-baseline.xml")
3434
def androidLintBaselinePath = Task { androidLintBaselinePath0().headOption }
3535

3636
// Set the linting report to be generated as both text and html files

0 commit comments

Comments
 (0)