trait TestModule extends Module with JavaModule with TaskModule
- Alphabetic
- By Inheritance
- TestModule
- JavaModule
- BspModule
- OfflineSupportModule
- CoursierModule
- GenIdeaModule
- TaskModule
- Module
- Cacher
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait JavaModuleTests extends Module with TestModule
- Definition Classes
- JavaModule
- trait Tests extends Module with JavaModuleTests
- Definition Classes
- JavaModule
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def allIvyDeps: T[api.Loose.Agg[Dep]]
Aggregation of mandatoryIvyDeps and ivyDeps.
Aggregation of mandatoryIvyDeps and ivyDeps. In most cases, instead of overriding this Target you want to override
ivyDeps
instead.- Definition Classes
- JavaModule
- def allSourceFiles: T[Seq[api.PathRef]]
All individual source files fed into the Java compiler
All individual source files fed into the Java compiler
- Definition Classes
- JavaModule
- def allSources: T[Seq[api.PathRef]]
The folders containing all source files fed into the compiler
The folders containing all source files fed into the compiler
- Definition Classes
- JavaModule
- def artifactId: T[String]
The exact id of the artifact to be published.
The exact id of the artifact to be published. You probably don't want to override this. If you want to customize the name of the artifact, override artifactName instead. If you want to customize the scala version in the artifact id, see ScalaModule.artifactScalaVersion
- Definition Classes
- JavaModule
- def artifactName: T[String]
Override this to change the published artifact id.
Override this to change the published artifact id. For example, by default a scala module foo.baz might be published as foo-baz_2.12 and a java module would be foo-baz. Setting this to baz would result in a scala artifact baz_2.12 or a java artifact baz.
- Definition Classes
- JavaModule
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assembly: T[api.PathRef]
An executable uber-jar/assembly containing all the resources and compiled classfiles from this module and all it's upstream modules and dependencies
An executable uber-jar/assembly containing all the resources and compiled classfiles from this module and all it's upstream modules and dependencies
- Definition Classes
- JavaModule
- def assemblyRules: Seq[Rule]
- Definition Classes
- JavaModule
- def bspBuildTarget: BspBuildTarget
Use to fill most fields of
BuildTarget
.Use to fill most fields of
BuildTarget
.- Definition Classes
- TestModule → JavaModule → BspModule
- def bspBuildTargetData: Task[Option[(String, AnyRef)]]
Use to populate the
BuildTarget.{dataKind,data}
fields.Use to populate the
BuildTarget.{dataKind,data}
fields.- Definition Classes
- BspModule
- Annotations
- @internal()
- def bspCompileClassesPath(pathsResolver: Task[EvaluatorPathsResolver]): Task[api.PathRef]
The path to the compiled classes without forcing to actually run the target.
The path to the compiled classes without forcing to actually run the target.
- Definition Classes
- JavaModule
- Annotations
- @internal()
- def bspCompileClasspath(pathsResolver: Task[EvaluatorPathsResolver]): Task[Seq[api.PathRef]]
Same as compileClasspath, but does not trigger compilation targets, if possible.
Same as compileClasspath, but does not trigger compilation targets, if possible.
- Definition Classes
- JavaModule
- Annotations
- @internal()
- def cachedTarget[T](t: => T)(implicit c: Enclosing): T
- Attributes
- protected[this]
- Definition Classes
- Cacher
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compile: T[CompilationResult]
Compiles the current module to generate compiled classfiles/bytecode
Compiles the current module to generate compiled classfiles/bytecode
- Definition Classes
- JavaModule
- def compileClasspath: T[api.Loose.Agg[api.PathRef]]
All classfiles and resources from upstream modules and dependencies necessary to compile this module
All classfiles and resources from upstream modules and dependencies necessary to compile this module
- Definition Classes
- JavaModule
- def compileIvyDeps: Target[api.Loose.Agg[Dep]]
Same as
ivyDeps
, but only present at compile time.Same as
ivyDeps
, but only present at compile time. Useful for e.g. macro-related dependencies likescala-reflect
that doesn't need to be present at runtime- Definition Classes
- JavaModule
- def compileModuleDeps: Seq[JavaModule]
The compile-only direct dependencies of this module.
The compile-only direct dependencies of this module.
- Definition Classes
- JavaModule
- def defaultCommandName(): String
- Definition Classes
- TestModule → JavaModule → TaskModule
- def docJar: T[api.PathRef]
The documentation jar, containing all the Javadoc/Scaladoc HTML files, for publishing to Maven Central
The documentation jar, containing all the Javadoc/Scaladoc HTML files, for publishing to Maven Central
- Definition Classes
- JavaModule
- def docResources: Sources
Extra directories to be copied into the documentation.
Extra directories to be copied into the documentation.
Typically includes static files such as html and markdown, but depends on the doc tool that is actually used.
- Definition Classes
- JavaModule
- See also
- def docSources: Sources
Directories to be processed by the API documentation tool.
Directories to be processed by the API documentation tool.
Typically includes the source files to generate documentation from.
- Definition Classes
- JavaModule
- See also
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalMainClass: T[String]
- Definition Classes
- JavaModule
- def finalMainClassOpt: T[Either[String, String]]
- Definition Classes
- JavaModule
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def forkArgs: Target[Seq[String]]
Any command-line parameters you want to pass to the forked JVM under
run
,test
orrepl
Any command-line parameters you want to pass to the forked JVM under
run
,test
orrepl
- Definition Classes
- JavaModule
- def forkEnv: Target[Map[String, String]]
Any environment variables you want to pass to the forked JVM under
run
,test
orrepl
Any environment variables you want to pass to the forked JVM under
run
,test
orrepl
- Definition Classes
- JavaModule
- def forkWorkingDir: Target[Path]
- Definition Classes
- JavaModule
- def generatedSources: T[Seq[api.PathRef]]
Folders containing source files that are generated rather than hand-written; these files can be generated in this target itself, or can refer to files generated from other targets
Folders containing source files that are generated rather than hand-written; these files can be generated in this target itself, or can refer to files generated from other targets
- Definition Classes
- JavaModule
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def ideaCompileOutput: T[PathRef]
- Definition Classes
- GenIdeaModule
- def ideaConfigFiles(ideaConfigVersion: Int): Command[Seq[IdeaConfigFile]]
Contribute components to idea config files.
Contribute components to idea config files.
- Definition Classes
- GenIdeaModule
- def ideaJavaModuleFacets(ideaConfigVersion: Int): Command[Seq[JavaFacet]]
Contribute facets to the Java module configuration.
Contribute facets to the Java module configuration.
- ideaConfigVersion
The IDEA configuration version in use. Probably
4
.
- Definition Classes
- GenIdeaModule
- def intellijModulePath: Path
- Definition Classes
- GenIdeaModule
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def ivyDeps: T[api.Loose.Agg[Dep]]
Any ivy dependencies you want to add to this Module, in the format ivy"org::name:version" for Scala dependencies or ivy"org:name:version" for Java dependencies
Any ivy dependencies you want to add to this Module, in the format ivy"org::name:version" for Scala dependencies or ivy"org:name:version" for Java dependencies
- Definition Classes
- JavaModule
- def ivyDepsTree(inverse: Boolean = false, withCompile: Boolean = false, withRuntime: Boolean = false): Command[Unit]
Command to print the transitive dependency tree to STDOUT.
Command to print the transitive dependency tree to STDOUT.
- inverse
Invert the tree representation, so that the root is on the bottom.
- withCompile
Include the compile-time only dependencies (
compileIvyDeps
, provided scope) into the tree.- withRuntime
Include the runtime dependencies (
runIvyDeps
, runtime scope) into the tree.
- Definition Classes
- JavaModule
- def jar: T[api.PathRef]
A jar containing only this module's resources and compiled classfiles, without those from upstream modules and dependencies
A jar containing only this module's resources and compiled classfiles, without those from upstream modules and dependencies
- Definition Classes
- JavaModule
- def javacOptions: T[Seq[String]]
Options to pass to the java compiler
Options to pass to the java compiler
- Definition Classes
- JavaModule
- def javadocOptions: T[Seq[String]]
Additional options to be used by the javadoc tool.
Additional options to be used by the javadoc tool. You should not set the
-d
setting for specifying the target directory, as that is done in the docJar target.- Definition Classes
- JavaModule
- def launcher: Target[api.PathRef]
Builds a command-line "launcher" file that can be used to run this module's code, without the Mill process.
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
- Definition Classes
- JavaModule
- def localClasspath: T[Seq[api.PathRef]]
The output classfiles/resources from this module, excluding upstream modules and third-party dependencies
The output classfiles/resources from this module, excluding upstream modules and third-party dependencies
- Definition Classes
- JavaModule
- def mainClass: T[Option[String]]
Allows you to specify an explicit main class to use for the
run
command.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- Definition Classes
- JavaModule
- def mandatoryIvyDeps: T[api.Loose.Agg[Dep]]
Mandatory ivy dependencies that are typically always required and shouldn't be removed by overriding ivyDeps, e.g.
Mandatory ivy dependencies that are typically always required and shouldn't be removed by overriding ivyDeps, e.g. the scala-library in the ScalaModule.
- Definition Classes
- JavaModule
- def manifest: T[JarManifest]
Creates a manifest representation which can be modified or replaced The default implementation just adds the
Manifest-Version
,Main-Class
andCreated-By
attributesCreates a manifest representation which can be modified or replaced The default implementation just adds the
Manifest-Version
,Main-Class
andCreated-By
attributes- Definition Classes
- JavaModule
- def mapDependencies: Task[(Dependency) => Dependency]
Map dependencies before resolving them.
Map dependencies before resolving them. Override this to customize the set of dependencies.
- Definition Classes
- CoursierModule
- implicit def millModuleBasePath: BasePath
- Definition Classes
- Module
- lazy val millModuleDirectChildren: Seq[define.Module]
- Definition Classes
- Module
- implicit def millModuleExternal: External
- Definition Classes
- Module
- implicit def millModuleSegments: Segments
- Definition Classes
- Module
- implicit def millModuleShared: Foreign
- Definition Classes
- Module
- def millOuterCtx: Ctx
- Definition Classes
- Module
- def millSourcePath: Path
- Definition Classes
- Module
- def moduleDeps: Seq[JavaModule]
The direct dependencies of this module
The direct dependencies of this module
- Definition Classes
- JavaModule
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def platformSuffix: T[String]
What platform suffix to use for publishing, e.g.
What platform suffix to use for publishing, e.g.
_sjs
for Scala.js projects- Definition Classes
- JavaModule
- def prepareOffline(): Command[Unit]
Prepare the module for working offline.
Prepare the module for working offline. This should typically fetch (missing) resources like ivy dependencies.
- Definition Classes
- JavaModule → OfflineSupportModule
- Annotations
- @nowarn()
- def prependShellScript: T[String]
What shell script to use to launch the executable generated by
assembly
.What shell script to use to launch the executable generated by
assembly
. Defaults to a generic "universal" launcher that should work for Windows, OS-X and Linux- Definition Classes
- JavaModule
- def printDepsTree(inverse: Boolean, additionalDeps: Task[api.Loose.Agg[Dep]]): Task[Unit]
Task that print the transitive dependency tree to STDOUT.
Task that print the transitive dependency tree to STDOUT.
- inverse
Invert the tree representation, so that the root is on the bottom.
- additionalDeps
Additional dependency to be included into the tree.
- Attributes
- protected
- Definition Classes
- JavaModule
- def recursiveModuleDeps: Seq[JavaModule]
The direct and indirect dependencies of this module
The direct and indirect dependencies of this module
- Definition Classes
- JavaModule
- def repositoriesTask: Task[Seq[Repository]]
The repositories used to resolved dependencies with resolveDeps().
The repositories used to resolved dependencies with resolveDeps().
- Definition Classes
- CoursierModule
- def resolutionCustomizer: Task[Option[(Resolution) => Resolution]]
Customize the coursier resolution resolution process.
Customize the coursier resolution 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 = T.task { Some( (r: coursier.core.Resolution) => r.withOsInfo(coursier.core.Activation.Os.fromProperties(sys.props.toMap)) ) }
- Definition Classes
- CoursierModule
- def resolveCoursierDependency: Task[(Dep) => Dependency]
- Definition Classes
- CoursierModule
- def resolveDeps(deps: Task[Agg[Dep]], sources: Boolean = false): Task[Agg[api.PathRef]]
Task that resolves the given dependencies using the repositories defined with repositories.
Task that resolves the given dependencies using the repositories defined with repositories.
- deps
The dependencies to resolve.
- sources
If
true
, resolve source dependencies instead of binary dependencies (JARs).- returns
The PathRefs to the resolved files.
- Definition Classes
- CoursierModule
- def resolvePublishDependency: Task[(Dep) => Dependency]
- Definition Classes
- JavaModule
- def resolvedIvyDeps: T[api.Loose.Agg[api.PathRef]]
Resolved dependencies based on transitiveIvyDeps and transitiveCompileIvyDeps.
Resolved dependencies based on transitiveIvyDeps and transitiveCompileIvyDeps.
- Definition Classes
- JavaModule
- def resolvedRunIvyDeps: T[api.Loose.Agg[api.PathRef]]
- Definition Classes
- JavaModule
- def resources: Sources
The folders where the resource files for this module live
The folders where the resource files for this module live
- Definition Classes
- JavaModule
- def run(args: String*): Command[Unit]
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
- Definition Classes
- JavaModule
- def runBackground(args: String*): Command[Unit]
Runs this module's code in a background process, until it dies or
runBackground
is used again.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- Definition Classes
- JavaModule
- def runClasspath: T[Seq[api.PathRef]]
All classfiles and resources from upstream modules and dependencies necessary to run this module's code after compilation
All classfiles and resources from upstream modules and dependencies necessary to run this module's code after compilation
- Definition Classes
- JavaModule
- def runIvyDeps: T[api.Loose.Agg[Dep]]
Same as
ivyDeps
, but only present at runtime.Same as
ivyDeps
, but only present at runtime. Useful for e.g. selecting different versions of a dependency to use at runtime after your code has already been compiled- Definition Classes
- JavaModule
- def runLocal(args: String*): Command[Unit]
Runs this module's code in-process within an isolated classloader.
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.- Definition Classes
- JavaModule
- def runMain(mainClass: String, args: String*): Command[Unit]
Same as
run
, but lets you specify a main class to runSame as
run
, but lets you specify a main class to run- Definition Classes
- JavaModule
- def runMainBackground(mainClass: String, args: String*): Command[Unit]
Same as
runBackground
, but lets you specify a main class to runSame as
runBackground
, but lets you specify a main class to run- Definition Classes
- JavaModule
- def runMainLocal(mainClass: String, args: String*): Command[Unit]
Same as
runLocal
, but lets you specify a main class to runSame as
runLocal
, but lets you specify a main class to run- Definition Classes
- JavaModule
- def runUseArgsFile: T[Boolean]
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.- Definition Classes
- JavaModule
- def showModuleDeps(recursive: Boolean = false): Command[Unit]
Show the module dependencies.
Show the module dependencies.
- recursive
If
true
include all recursive module dependencies, else only show direct dependencies.
- Definition Classes
- JavaModule
- def skipIdea: Boolean
Skip Idea project file generation.
Skip Idea project file generation.
- Definition Classes
- GenIdeaModule
- def sourceJar: Target[api.PathRef]
The source jar, containing only source code for publishing to Maven Central
The source jar, containing only source code for publishing to Maven Central
- Definition Classes
- JavaModule
- def sources: Sources
The folders where the source files for this module live
The folders where the source files for this module live
- Definition Classes
- JavaModule
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def test(args: String*): Command[(String, Seq[Result])]
Discovers and runs the module's tests in a subprocess, reporting the results to the console.
Discovers and runs the module's tests in a subprocess, reporting the results to the console.
- See also
- def testCached: T[(String, Seq[Result])]
Discovers and runs the module's tests in a subprocess, reporting the results to the console.
Discovers and runs the module's tests in a subprocess, reporting the results to the console. If no input has changed since the last run, no test were executed.
- See also
test()
- def testCachedArgs: T[Seq[String]]
Args to be used by testCached.
- def testFramework: T[String]
The test framework to use.
- def testLocal(args: String*): Command[(String, Seq[Result])]
Discovers and runs the module's tests in-process in an isolated classloader, reporting the results to the console
- def testOnly(args: String*): Command[(String, Seq[Result])]
Discovers and runs the module's tests in a subprocess, reporting the results to the console.
Discovers and runs the module's tests in a subprocess, reporting the results to the console. Arguments before "--" will be used as wildcard selector to select test classes, arguments after "--" will be passed as regular arguments.
testOnly *foo foobar bar* -- arguments
will test only classes with name (includes package name) 1. end with "foo", 2. exactly "foobar", 3. start with "bar", with "arguments" as arguments passing to test framework. - def testTask(args: Task[Seq[String]], globSelectors: Task[Seq[String]]): Task[(String, Seq[Result])]
- Attributes
- protected
- def testUseArgsFile: T[Boolean]
Controls whether the TestRunner should receive it's arguments via an args-file instead of a as long parameter list.
Controls whether the TestRunner should receive it's arguments via an args-file instead of a as long parameter list. Defaults to
true
on Windows, as Windows has a rather short parameter length limit. - def toString(): String
- Definition Classes
- Module → AnyRef → Any
- def transitiveCompileIvyDeps: T[api.Loose.Agg[Dep]]
The compile-only transitive ivy dependencies of this module and all it's upstream compile-only modules.
The compile-only transitive ivy dependencies of this module and all it's upstream compile-only modules.
- Definition Classes
- JavaModule
- def transitiveIvyDeps: T[api.Loose.Agg[Dep]]
The transitive ivy dependencies of this module and all it's upstream modules.
The transitive ivy dependencies of this module and all it's upstream modules. This is calculated from ivyDeps, mandatoryIvyDeps and recursively from moduleDeps.
- Definition Classes
- JavaModule
- def transitiveLocalClasspath: T[api.Loose.Agg[api.PathRef]]
The transitive version of
localClasspath
The transitive version of
localClasspath
- Definition Classes
- JavaModule
- def transitiveModuleDeps: Seq[JavaModule]
Like
recursiveModuleDeps
but also include the module itselfLike
recursiveModuleDeps
but also include the module itself- Definition Classes
- JavaModule
- def unmanagedClasspath: T[api.Loose.Agg[api.PathRef]]
Additional jars, classfiles or resources to add to the classpath directly from disk rather than being downloaded from Maven Central or other package repositories
Additional jars, classfiles or resources to add to the classpath directly from disk rather than being downloaded from Maven Central or other package repositories
- Definition Classes
- JavaModule
- def upstreamAssembly: T[api.PathRef]
Build the assembly for upstream dependencies separate from the current classpath
Build the assembly for upstream dependencies separate from the current classpath
This should allow much faster assembly creation in the common case where upstream dependencies do not change
- Definition Classes
- JavaModule
- def upstreamAssemblyClasspath: T[api.Loose.Agg[api.PathRef]]
All upstream classfiles and resources necessary to build and executable assembly, but without this module's contribution
All upstream classfiles and resources necessary to build and executable assembly, but without this module's contribution
- Definition Classes
- JavaModule
- def upstreamCompileOutput: T[Seq[CompilationResult]]
The upstream compilation output of all this module's upstream modules
The upstream compilation output of all this module's upstream modules
- Definition Classes
- JavaModule
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def zincWorker: ZincWorkerModule
- Definition Classes
- JavaModule
- object millInternal extends Internal
- Definition Classes
- Module
- Annotations
- @Scaladoc()
Deprecated Value Members
- def repositories: Seq[Repository]
The repositories used to resolved dependencies with resolveDeps().
The repositories used to resolved dependencies with resolveDeps().
- Definition Classes
- CoursierModule
- Annotations
- @deprecated
- Deprecated
(Since version mill after 0.8.0) Use repositoriesTask instead
- def testFrameworks: T[Seq[String]]
What test frameworks to use.
What test frameworks to use.
- Annotations
- @deprecated
- Deprecated
(Since version mill after 0.9.6) Use testFramework instead.
- def testTask(args: Task[Seq[String]]): Task[(String, Seq[Result])]
- Attributes
- protected
- Annotations
- @deprecated
- Deprecated
(Since version mill after 0.9.7) Use testTask(args, T.task{Seq.empty[String]}) instead.