Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Minimally, you can configure the base source directory in the <code>Test</code> and <code>Compile</code> scopes, then configure the resource directory in the <code>Compile</code> scope. That setting will be correct in the <code>Test</code> scope because by default it is relative to the <code>sourceDirectory</code>. Similarly, the <code>scala-source</code> and <code>java-source</code> settings will be correct.</p> <pre><code>sourceDirectory in Compile &lt;&lt;= baseDirectory(_ / "src") sourceDirectory in Test &lt;&lt;= baseDirectory(_ / "test") resourceDirectory in Compile &lt;&lt;= baseDirectory(_ / "resources") </code></pre> <p>To see this in action:</p> <pre><code>&gt; set sourceDirectory in Compile &lt;&lt;= baseDirectory(_ / "src") [info] Reapplying settings... [info] Set current project to default-fcf187 (in build file:/C:/temp/) &gt; set sourceDirectory in Test &lt;&lt;= baseDirectory(_ / "test") [info] Reapplying settings... [info] Set current project to default-fcf187 (in build file:/C:/temp/) &gt; set resourceDirectory in Compile &lt;&lt;= baseDirectory(_ / "resources") [info] Reapplying settings... [info] Set current project to default-fcf187 (in build file:/C:/temp/) &gt; show test:resource-directory [info] C:\temp\test\resources &gt; show compile:resource-directory [info] C:\temp\resources &gt; show test:scala-source [info] C:\temp\test\scala &gt; show test:java-source [info] C:\temp\test\java &gt; show compile:java-source [info] C:\temp\src\java &gt; show test:java-source [info] C:\temp\test\java </code></pre> <p>You can inspect the relationships between settings in the shell with <code>inspect</code>; or by browsing the <a href="https://github.com/harrah/xsbt/blob/v0.10.1/main/Defaults.scala#L111" rel="noreferrer">source of SBT</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload