From its Intro (https://www.lihaoyi.com/mill/index.html): Mill is your shiny new Java/Scala build tool! Scared of SBT? Melancholy over Maven? Grumbling about Gradle? Baffled by Bazel? Give Mill a try!
Questions tagged [mill]
34 questions
5
votes
1 answer
Scala VSCode, metals intellisense not working correctly
This code does compile and run with mill, but intellisense shows error "object pwd is not a member of package foo.os bloop"
//main.scala
package foo
object Exercise{
def main(args: Array[String]): Unit = {
println(os.pwd)
…

usermine12
- 77
- 1
- 7
4
votes
1 answer
Mill Build Tool - Install dependencies without compiling source code
I'm using the Mill Build Tool for a Scala project, which uses a build.sc file to list specific dependencies for different modules within the project. Now, I'm trying to dockerize the project and would like to install the dependencies in the image…

Beolap
- 768
- 9
- 15
3
votes
1 answer
Mill Build Tool, how to use `evicted`
I want to run evicted in my Mill-project.
With SBT it can be done in the sbt-console, using:
sbt>evicted
This returns a list of version conflicts warnings:
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary…

pme
- 14,156
- 3
- 52
- 95
2
votes
0 answers
Is there a Mill "Run Configuration" for IntelliJ?
I'm trying to figure out how to create a "Run Configuration" for a Scala Mill project.
There are entries for Maven and SBT, but nothing for Mill. There doesn't seem to be a "Mill" plugin for IntelliJ either.
I create a Scala Mill project with this…

Neil
- 24,551
- 15
- 60
- 81
2
votes
1 answer
mill client.fastOpt: client.scalaJSLinkerClasspath scala.MatchError: 1 (of class java.lang.String)
I want to run a ScalaJS module with mill Build Tool.
When running mill client.fastOpt I get:
[6/73] client.scalaJSLinkerClasspath
1 targets failed
client.scalaJSLinkerClasspath scala.MatchError: 1 (of class java.lang.String)
…

pme
- 14,156
- 3
- 52
- 95
1
vote
1 answer
Are there any mill/scala-3/scala.js examples available?
Is there a guide or example somewhere for using mill build tool with scala-3 and scala.js? I saw that the same question had been asked, but implicitly for sbt, and the answer was essentially "it just works". In mill I change the scalaVersion from…

user3416742
- 168
- 1
- 1
- 7
1
vote
1 answer
How to specify the main class (in the root directory) for Mill to run?
I am new to the sbt and mill, and I am practicing to use both tool to build the chisel (scala project). View this github repo as a reference, I am wondering to know how to write the mill-version build.sh in that repo.
Here is my directory…

徐韋凱
- 11
- 1
1
vote
1 answer
Twirl dependencies required for scalatra project using Gradle/Mill
For a web application, I am using scalatra. Mill is my build tool of choice. To render UI, I am considering twirl template engine. However, all the examples/references that I have come through only show twirl using sbt.
What all twirl dependencies…

nashter
- 1,181
- 1
- 15
- 33
1
vote
1 answer
How can a mill task update environment variables so that later running tasks will see the updated value?
In mill v0.9.9 Task Context API documentation it is said
Mill keeps a long-lived JVM server to avoid paying the cost of
recurrent classloading. Because of this, running System.getenv in a
task might not yield up to date environment variables, since…

user4955663
- 1,039
- 2
- 13
- 21
1
vote
1 answer
How to create Sources from a Seq[Path] in mill build.sc file?
Mill documentation says
Sources are defined using T.sources {…}, taking one-or-more os.Paths
as arguments. A Source is a subclass of Target[Seq[PathRef]]
So this is possible in mill v0.9.9
def sourceRoots: Sources = T.sources { os.pwd / "src"…

user4955663
- 1,039
- 2
- 13
- 21
1
vote
1 answer
spark and mill - create an additional task that creates a filtered assembly
I want to build a mill job that allows me to develop and run a Spark job locally either by SparkSample.run or having a full fat jar for local tests.
At some point of time I'd like to send it as a filtered assembly (i.e. without all spark related…

Bernhard
- 25
- 1
- 3
1
vote
1 answer
How to get mill to hot-reload a PlayFramework application in dev mode (like SBT's ~run command)?
I have set up a PlayFramework project with mill (version 0.5.2), as described in this question. The official documentation for mill lists some commands for running the application, but these commands (a) run only in PROD mode, and (b) do not hot…

Shafique Jamal
- 1,550
- 3
- 21
- 45
1
vote
1 answer
How do I set up a PlayFramework project using the mill build tool, and without using SBT?
Here is how I currently set up a PlayFramework project for use with mill:
Create a folder: /path/to/play-scala-seed-mill/ and cd into that folder.
Create a build.sc file in this folder, according to the instructions in the official documentation…

Shafique Jamal
- 1,550
- 3
- 21
- 45
1
vote
1 answer
How do I get IntellijIdea to recognize the syntax in my build.sc file?
Here is my build.sc file:
import mill._
import $ivy.`com.lihaoyi::mill-contrib-playlib:$MILL_VERSION`, mill.playlib._
object core extends PlayModule {
//config
override def scalaVersion= T{"2.12.8"}
override def playVersion= T{"2.7.3"}
…

Shafique Jamal
- 1,550
- 3
- 21
- 45
1
vote
1 answer
Mill Build Tool: How to run the tests of all Modules at once?
I'm using Mill and I can't figure out how to run the tests or even compile all Modules at once.
There is clear, but running mill resolve _ does not seem to have a command for it.
For now I run the tests for each Module separately.
Is there a way to…

pme
- 14,156
- 3
- 52
- 95