Attributes
- Companion
- object
- Source
- RunModule.scala
- Graph
-
- Supertypes
-
trait RunModuleApitrait WithJvmWorkerModuletrait JavaHomeModuletrait CoursierModuletrait Moduletrait ModuleApitrait Wrapperclass BaseClasstrait Cachertrait Cacherclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait JavaModuletrait JavaTeststrait KotlinTeststrait KspTeststrait AndroidLibKotlinTeststrait KotlinJsTeststrait KotestTeststrait KotlinTestPackageTeststrait KotlinMavenTeststrait AndroidAppTeststrait AndroidAppKotlinTeststrait AndroidLibTeststrait MavenTeststrait SbtTeststrait CrossSbtTeststrait ScalaTeststrait ScalaJSTeststrait ScalaNativeTeststrait AndroidAppBundletrait AndroidModuletrait AndroidAppModuletrait AndroidAppKotlinModuletrait AndroidBuildConfigtrait AndroidNativeAppModuletrait AndroidR8AppModuletrait AndroidKotlinModuletrait AndroidHiltSupporttrait AndroidLibKotlinModuletrait AndroidLibModuletrait CheckstyleModuletrait CheckstyleXsltModuletrait ErrorProneModuletrait PalantirFormatModuletrait KtfmtBaseModuletrait KtfmtModuleobject KtfmtModuletrait KotlinModuletrait DetektModuletrait KotlinJsModuletrait KoverModuletrait KspModuletrait KotlinMavenModuletrait PlatformKotlinModuletrait ScalafmtModuleobject ScalafmtModuleobject ScalafmtWorkerModuletrait BomModuletrait JlinkModuletrait JpackageModuletrait MavenModuletrait SbtModuletrait CrossSbtModuletrait SbtNativeModuletrait PlatformModuleBasetrait PlatformScalaModuletrait PublishModuletrait ScalaModuletrait ScalaJSModuletrait TestScalaJSModuletrait CrossModuleBasetrait CrossScalaModuletrait CrossScalaVersionRangestrait UnidocModuletrait ScalaNativeModuletrait TestScalaNativeModuletrait TestModuletrait AndroidTestModuletrait AndroidJUnittrait Junit4trait Junit5trait Munittrait ScalaChecktrait ScalaTesttrait Specs2trait TestNgtrait Utesttrait Weavertrait ZioTestShow all
Members list
Type members
Inherited classlikes
Miscellaneous machinery around traversing & querying the build hierarchy, that should not be needed by normal users of Mill
Miscellaneous machinery around traversing & querying the build hierarchy, that should not be needed by normal users of Mill
Attributes
- Inherited from:
- Module
- Source
- Module.scala
- Supertypes
Value members
Concrete methods
Environment variables to pass to the forked JVM.
Environment variables to pass to the forked JVM.
Includes forkEnv and the variables defined by Mill itself.
Attributes
- Source
- RunModule.scala
All main classes detected in this module that can serve as program entry-points.
All main classes detected in this module that can serve as program entry-points.
Attributes
- Source
- RunModule.scala
Attributes
- Source
- RunModule.scala
Attributes
- Source
- RunModule.scala
Attributes
- Source
- RunModule.scala
Any command-line parameters you want to pass to the forked JVM.
Any environment variables you want to pass to the forked JVM.
Attributes
- Source
- RunModule.scala
Builds a command-line "launcher" file that can be used to run this module's code, without the Mill process. Useful for deployment & other places where you do not want a build tool running
Builds a command-line "launcher" file that can be used to run this module's code, without the Mill process. Useful for deployment & other places where you do not want a build tool running
Attributes
- Source
- RunModule.scala
The elements of the run classpath which are local to this module. This is typically the output of a compilation step and bundles runtime resources.
The elements of the run classpath which are local to this module. This is typically the output of a compilation step and bundles runtime resources.
Attributes
- Source
- RunModule.scala
Allows you to specify an explicit main class to use for the run
command. If none is specified, the classpath is searched for an appropriate main class to use if one exists.
Allows you to specify an explicit main class to use for the run
command. If none is specified, the classpath is searched for an appropriate main class to use if one exists.
Attributes
- Source
- RunModule.scala
Runs this module's code in a subprocess and waits for it to finish
Runs this module's code in a subprocess and waits for it to finish
Attributes
- Source
- RunModule.scala
Runs this module's code in a background process, until it dies or runBackground
is used again. This lets you continue using Mill while the process is running in the background: editing files, compiling, and only re-starting the background process when you're ready.
Runs this module's code in a background process, until it dies or runBackground
is used again. This lets you continue using Mill while the process is running in the background: editing files, compiling, and only re-starting the background process when you're ready.
You can also use -w foo.runBackground
to make Mill watch for changes and automatically recompile your code & restart the background process when ready. This is useful when working on long-running server processes that would otherwise run forever
Attributes
- Source
- RunModule.scala
If true, stdout and stderr of the process executed by runBackground
or runMainBackground
is sent to mill's stdout/stderr (which usually flow to the console).
If true, stdout and stderr of the process executed by runBackground
or runMainBackground
is sent to mill's stdout/stderr (which usually flow to the console).
If false, output will be directed to files stdout.log
and stderr.log
in runBackground.dest
(or runMainBackground.dest
)
Attributes
- Source
- RunModule.scala
Attributes
- Source
- RunModule.scala
All classfiles and resources including upstream modules and dependencies necessary to run this module's code.
All classfiles and resources including upstream modules and dependencies necessary to run this module's code.
Attributes
- Source
- RunModule.scala
Runs this module's code in a subprocess and waits for it to finish
Runs this module's code in a subprocess and waits for it to finish
Attributes
- Source
- RunModule.scala
Runs this module's code in-process within an isolated classloader. This is faster than run
, but in exchange you have less isolation between runs since the code can dirty the parent Mill process and potentially leave it in a bad state.
Runs this module's code in-process within an isolated classloader. This is faster than run
, but in exchange you have less isolation between runs since the code can dirty the parent Mill process and potentially leave it in a bad state.
Attributes
- Source
- RunModule.scala
Attributes
- Source
- RunModule.scala
Same as run
, but lets you specify a main class to run
Same as runBackground
, but lets you specify a main class to run
Same as runLocal
, but lets you specify a main class to run
Control whether run*
-targets should use an args file to pass command line args, if possible.
Control whether run*
-targets should use an args file to pass command line args, if possible.
Attributes
- Source
- RunModule.scala
Attributes
- Source
- RunModule.scala
Inherited methods
The repositories used to resolve dependencies
The repositories used to resolve dependencies
Unlike repositoriesTask, this includes the Mill internal repositories, which allow to resolve Mill internal modules (usually brought in via JavaModule#coursierDependency
).
Beware that this needs to evaluate JavaModule#coursierProject
of all module dependencies of the current module, which itself evaluates JavaModule#mvnDeps
and related tasks. You shouldn't depend on this task from implementations of mvnDeps
, which would introduce cycles between Mill tasks.
Attributes
- Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
Bind a dependency (Dep) to the actual module context (e.g. the scala version and the platform suffix)
Bind a dependency (Dep) to the actual module context (e.g. the scala version and the platform suffix)
Attributes
- Returns
-
The BoundDep
- Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
Whether to enable Gradle Module support when fetching dependencies
Whether to enable Gradle Module support when fetching dependencies
Attributes
- Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
Customize the coursier file cache.
Customize the coursier file cache.
This is rarely needed to be changed, but sometimes e.g. you want to load a coursier plugin. Doing so requires adding to coursier's classpath. To do this you could use the following:
override def coursierCacheCustomizer = Task.Anon {
Some( (fc: coursier.cache.FileCache[Task]) =>
fc.withClassLoaders(Seq(classOf[coursier.cache.protocol.S3Handler].getClassLoader))
)
}
Attributes
- Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
A CoursierModule.Resolver
to resolve dependencies.
A CoursierModule.Resolver
to resolve dependencies.
Can be used to resolve external dependencies, if you need to download an external tool from Maven or Ivy repositories, by calling CoursierModule.Resolver#classpath
.
Attributes
- Returns
-
CoursierModule.Resolver
instance - Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
Optional custom Java Home for the JvmWorker to use
Optional custom Java Home for the JvmWorker to use
If this value is None, then the JvmWorker uses the same Java used to run the current mill instance.
Attributes
- Inherited from:
- JavaHomeModule
- Source
- JavaHomeModule.scala
Attributes
- Inherited from:
- JavaHomeModule
- Source
- JavaHomeModule.scala
Attributes
- Inherited from:
- JavaHomeModule
- Source
- JavaHomeModule.scala
Attributes
- Inherited from:
- WithJvmWorkerModule
- Source
- WithJvmWorkerModule.scala
Map dependencies before resolving them. Override this to customize the set of dependencies.
Map dependencies before resolving them. Override this to customize the set of dependencies.
Attributes
- Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
A CoursierModule.Resolver to resolve dependencies.
A CoursierModule.Resolver to resolve dependencies.
Unlike defaultResolver, this resolver can resolve Mill modules too (obtained via JavaModule.coursierDependency).
Attributes
- Returns
-
CoursierModule.Resolver
instance - Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
Attributes
- Inherited from:
- BaseClass
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
The repositories used to resolve dependencies with classpath(). This takes Coursier repository strings as input which are defined here:
The repositories used to resolve dependencies with classpath(). This takes Coursier repository strings as input which are defined here:
For example:
-
https://repo1.maven.org/maven2 Maven Central which is the most commonly used Maven repository
-
file:///Users/alex/test-repo A local repository cache on disk
-
file://${ivy.home-${user.home}/.ivy2}/local/[defaultPattern] The local Ivy2 repository where Mill, Scala CLI, or sbt publish to when asked to publish locally
-
file://${user.home}/.m2/repository the local Maven repository. Use of this is not recommended for reasons explained in the link above
-
https://maven.google.com Google-managed repository that distributes some Android artifacts in particular
Attributes
- Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
A more flexible version of repositories, that allows custom repositories that are not definable by Coursier repository strings. This is a relatively advanced feature, and for most situations overriding repositories should be sufficient
A more flexible version of repositories, that allows custom repositories that are not definable by Coursier repository strings. This is a relatively advanced feature, and for most situations overriding repositories should be sufficient
See allRepositories if you need to resolve Mill internal modules.
Attributes
- Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
Customize the coursier resolution process. This is rarely needed to changed, as the default try to provide a highly reproducible resolution process. But sometime, you need more control, e.g. you want to add some OS or JDK specific resolution properties which are sometimes used by Maven and therefore found in dependency artifact metadata. For example, the JavaFX artifacts are known to use OS specific properties. To fix resolution for JavaFX, you could override this task like the following:
Customize the coursier resolution process. This is rarely needed to changed, as the default try to provide a highly reproducible resolution process. But sometime, you need more control, e.g. you want to add some OS or JDK specific resolution properties which are sometimes used by Maven and therefore found in dependency artifact metadata. For example, the JavaFX artifacts are known to use OS specific properties. To fix resolution for JavaFX, you could override this task like the following:
override def resolutionCustomizer = Task.Anon {
Some( (r: coursier.core.Resolution) =>
r.withOsInfo(coursier.core.Activation.Os.fromProperties(sys.props.toMap))
)
}
Attributes
- Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
Resolution parameters, allowing to customize resolution internals
Resolution parameters, allowing to customize resolution internals
This rarely needs to be changed. This allows to disable the new way coursier handles BOMs since coursier 2.1.17 (used in Mill since 0.12.3) for example, with:
def resolutionParams = super.resolutionParams()
.withEnableDependencyOverrides(Some(false))
Note that versions forced with Dep#forceVersion()
take over forced versions manually set in resolutionParams
. The former should be favored to force versions in dependency resolution.
The Scala version set via ScalaModule#scalaVersion
also takes over any Scala version provided via ResolutionParams#scalaVersionOpt
.
The default configuration set in ResolutionParams#defaultConfiguration
is ignored when Mill fetches dependencies to be passed to the compiler (equivalent to Maven "compile scope"). In that case, it forces the default configuration to be "compile". On the other hand, when fetching dependencies for runtime (equivalent to Maven "runtime scope"), the value in ResolutionParams#defaultConfiguration
is used.
Attributes
- Inherited from:
- CoursierModule
- Source
- CoursierModule.scala
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Module -> Any
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- JavaHomeModule
- Source
- JavaHomeModule.scala