You can use Mill together with Bloop to speed up your development workflow and better integrate your build with your IDE.
Mill has built-in support for Bloop via
mill-contrib, so follow the instructions below to install the
- Your mill version needs to be >=
Install the plugin
Install bloop in
build.sc by replacing
$MILL_VERSION in the following
Export your build
The mill command
mill mill.contrib.Bloop/install exports your mill build to bloop.
The mill plugin generates a configuration file per every compile and test
sources in your build definition. For example, a build with a single Scala
foo generates two configuration files by default:
$ mill mill.contrib.Bloop/install
info Generated '/disk/foo/.bloop/foo.json'.
info Generated '/disk/foo/.bloop/foo-test.json'.
foocomes from the compile source set; and,
foo-testcomes from the test source set and depends on
Verify installation and export
If you haven't installed bloop and its CLI yet, follow these instructions before proceeding.
Verify your installation by running
bloop projects in the root of the mill workspace directory.
$ bloop projects
If the results of
bloop projects is empty, check that:
- You are running the command-line invocation in the root base directory (e.g.
- The mill build export process completed successfully.
.bloop/configuration directory contains bloop configuration files.
If you suspect bloop is loading the configuration files from somewhere else, run
$ bloop projects --verbose
[D] Projects loaded from '/my-project/.bloop':
Here's a list of bloop commands you can run next to start playing with bloop:
bloop compile --help: shows the help section for compile.
bloop compile foo-test: compiles foo's
bloop test foo-test -w: runs foo tests repeatedly with file watching enabled.
After verifying the export, you can continue using Bloop's command-line application or any build client integrating with Bloop, such as Metals.
Next steps after installation
If you need help, you can always come over our Discord channel.