HomeDocs
DocsCommunityTestimonialsUsersGitHubTwitterBlogJobsTermsPrivacyCookies
TermsPrivacyCookies
Hey! These docs are for version 2.10, which is no longer officially supported. Click here for the latest version, 2.17!


The Scala compiler.

Backend: <span style="color: purple"><code>pants.backend.experimental.scala</code></span> Config section: <span style="color: purple"><code>[scalac]</code></span>

## Basic options

<div style="color: purple"> <h3><code>args</code></h3> <code>--scalac-args=&quot;[&lt;shell_str&gt;, &lt;shell_str&gt;, ...]&quot;</code><br> <code>PANTS_SCALAC_ARGS</code><br> </div> <div style="padding-left: 2em;"> <span style="color: green">default: <code>[]</code></span>

<br>

Global `scalac` compiler flags, e.g. `--scalac-args='-encoding UTF-8'`.

</div> <br>

## Advanced options

<div style="color: purple"> <h3><code>plugins_global</code></h3> <code>--scalac-plugins-global=&quot;['&lt;str&gt;', '&lt;str&gt;', ...]&quot;</code><br> <code>PANTS_SCALAC_PLUGINS_GLOBAL</code><br> </div> <div style="padding-left: 2em;"> <span style="color: green">default: <code>[]</code></span>

<br>

A list of addresses of `scalac_plugin` targets which should be used for compilation of all Scala targets in a build.

If you set this, you must also set `[scalac].plugins_global_lockfile`.

</div> <br>

<div style="color: purple"> <h3><code>plugins_global_lockfile</code></h3> <code>--scalac-plugins-global-lockfile=&lt;str&gt;</code><br> <code>PANTS_SCALAC_PLUGINS_GLOBAL_LOCKFILE</code><br> </div> <div style="padding-left: 2em;"> <span style="color: green">default: <code>&lt;default&gt;</code></span>

<br>

The filename of the lockfile for global plugins. You must set this option to a file path, e.g. '3rdparty/jvm/global_scalac_plugins.lock', if you set `[scalac].plugins_global`.

</div> <br>

## Deprecated options

None