-
-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
30 changed files
with
106 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
import mill._, scalalib._ | ||
import $file.foo.versions | ||
import $file.util, util.MyModule | ||
object `package` extends RootModule with MyModule{ | ||
object `package` extends RootModule with MyModule { | ||
def forkEnv = Map( | ||
"MY_SCALA_VERSION" -> build.scalaVersion(), | ||
"MY_PROJECT_VERSION" -> versions.myProjectVersion, | ||
"MY_PROJECT_VERSION" -> versions.myProjectVersion | ||
) | ||
} | ||
|
||
/** See Also: util.sc */ | ||
/** See Also: foo/package.sc */ | ||
/** See Also: foo/versions.sc */ | ||
|
||
|
||
// To ease the migration from Mill 0.11.x, the older `.sc` file extension is also supported | ||
// for Mill build files, and the `package` declaration is optional in such files. Note that | ||
// this means that IDE support using `.sc` files will not be as good as IDE support using the | ||
// current `.mill` extension with `package` declaration, so you should use `.mill` whenever | ||
// possible | ||
|
||
/** Usage | ||
> ./mill run | ||
Main Env build.util.myScalaVersion: 2.13.14 | ||
Main Env build.foo.versions.myProjectVersion: 0.0.1 | ||
> ./mill foo.run | ||
Foo Env build.util.myScalaVersion: 2.13.14 | ||
Foo Env build.foo.versions.myProjectVersion: 0.0.1 | ||
*/ | ||
/** | ||
* Usage | ||
* | ||
* > ./mill run | ||
* Main Env build.util.myScalaVersion: 2.13.14 | ||
* Main Env build.foo.versions.myProjectVersion: 0.0.1 | ||
* | ||
* > ./mill foo.run | ||
* Foo Env build.util.myScalaVersion: 2.13.14 | ||
* Foo Env build.foo.versions.myProjectVersion: 0.0.1 | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
def myProjectVersion = "0.0.1" | ||
def myProjectVersion = "0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
example/depth/large/13-helper-files-mill-sc/foo/versions.mill.sc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package build.foo | ||
|
||
def myProjectVersion = "0.0.1" | ||
def myProjectVersion = "0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
example/extending/metabuild/5-meta-shared-sources/mill-build/src/ScalaVersion.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package millbuild | ||
object ScalaVersion{ | ||
object ScalaVersion { | ||
def myScalaVersion = "2.13.10" | ||
} |
10 changes: 6 additions & 4 deletions
10
example/extending/plugins/7-writing-mill-plugins/myplugin/src/LineCountJavaModule.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
package myplugin | ||
import mill._ | ||
|
||
/** | ||
* Example Mill plugin trait that adds a `line-count.txt` | ||
* to the resources of your `JavaModule` | ||
*/ | ||
trait LineCountJavaModule extends mill.javalib.JavaModule{ | ||
trait LineCountJavaModule extends mill.javalib.JavaModule { | ||
|
||
/** Name of the file containing the line count that we create in the resource path */ | ||
def lineCountResourceFileName: T[String] | ||
|
||
/** Total number of lines in module's source files */ | ||
def lineCount = T{ | ||
def lineCount = T { | ||
allSourceFiles().map(f => os.read.lines(f.path).size).sum | ||
} | ||
|
||
/** Generate resources using lineCount of sources */ | ||
override def resources = T{ | ||
override def resources = T { | ||
os.write(T.dest / lineCountResourceFileName(), "" + lineCount()) | ||
super.resources() ++ Seq(PathRef(T.dest)) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,3 @@ object Foo2 { | |
if (sys.env.contains("MY_CUSTOM_ENV")) println("MY_CUSTOM_ENV: " + sys.env("MY_CUSTOM_ENV")) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
package bar | ||
|
||
/** | ||
* My Awesome Docs for class Bar | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.