Skip to content

Commit 9b29ea8

Browse files
committed
updated site
1 parent ab15821 commit 9b29ea8

9 files changed

+42
-16
lines changed

2.x/docs/en/changes/migrating-from-sbt-1.x.html

+13-1
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,23 @@ <h2 id="bare-settings-changes"><a class="header" href="#bare-settings-changes">B
195195
<p>In sbt 1.x bare settings were project settings that applied only to the root subproject. In sbt 2.x, the bare settings in <code>build.sbt</code> are common settings that are injected to <strong>all subprojects</strong>.</p>
196196
</div>
197197
</div>
198-
<pre><code class="language-scala">name := "root"
198+
<pre><code class="language-scala">name := "root" // every subprojects will be named root!
199199
publish / skip := true
200200
</code></pre>
201201
<h3 id="migrating-thisbuild"><a class="header" href="#migrating-thisbuild">Migrating ThisBuild</a></h3>
202202
<p>In sbt 2.x, bare settings settings should no longer be scoped to <code>ThisBuild</code>. One benefit of the new <em>common settings</em> over <code>ThisBuild</code> is that it would act in a more predictable delegation. These settings are inserted between plugins settings and those defined in <code>settings(...)</code>, meaning they can be used to define settings like <code>Compile / scalacOptions</code>, which was not possible with <code>ThisBuild</code>.</p>
203+
<h2 id="cross-building-sbt-plugins"><a class="header" href="#cross-building-sbt-plugins">Cross building sbt plugins</a></h2>
204+
<p>In sbt 2.x, if you cross build an sbt plugin with Scala 3.x and 2.12.x, it will automatically cross build against sbt 1.x and sbt 2.x:</p>
205+
<pre><code class="language-scala">// using sbt 2.x
206+
lazy val plugin = (projectMatrix in file("plugin"))
207+
.enablePlugins(SbtPlugin)
208+
.settings(
209+
name := "sbt-vimquit",
210+
)
211+
.jvmPlatform(scalaVersions = Seq("3.3.3", "2.12.20"))
212+
</code></pre>
213+
<p>If you use <code>projectMatrix</code>, make sure to move the plugin to a subdirectory like <code>plugin/</code>. Otherwise, the synthetic root project will also pick up the <code>src/</code>.
214+
Use sbt 1.10.2 or later to cross build from sbt 1.x side.</p>
203215
<h2 id="migrating-to-slash-syntax"><a class="header" href="#migrating-to-slash-syntax">Migrating to slash syntax</a></h2>
204216
<p>sbt 1.x supported both the sbt 0.13 style syntax and the slash syntax. sbt 2.x removes the support for the sbt 0.13 syntax, so use the slash syntax for both sbt shell and in <code>build.sbt</code>:</p>
205217
<pre><code class="language-scala">&lt;project-id&gt; / Config / intask / key

2.x/docs/en/changes/sbt-2.0-change-summary.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ <h2 id="changes-with-compatibility-implications"><a class="header" href="#change
196196
<li>Bare settings are added to all subprojects, as opposed to just the root subproject, and thus replacing the role that <code>ThisBuild</code> has played. by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/6746">#6746</a></li>
197197
<li><code>test</code> task is changed to be incremental test that can cache test results. Use <code>testFull</code> for full test by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/7686">#7686</a></li>
198198
<li>sbt 2.x plugins are published with <code>_sbt2_3</code> suffix by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/7671">#7671</a></li>
199-
<li>sbt 2.x adds <code>platform</code> setting so <code>ModuleID</code>'s <code>%%</code> operator can cross build on JVM as well as JS and Native, as opposed to <code>%%%</code> operator that was created in a plugin to workaround this issue. by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/6746">#6746</a></li>
199+
<li>sbt 2.x adds <code>platform</code> setting so <code>ModuleID</code>'s <code>%%</code> operator can cross build on JVM as well as JS and Native, as opposed to <code>%%%</code> operator that was created in a plugin to workaround this issue, by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/6746">#6746</a></li>
200+
<li>Dropped <code>useCoursier</code> setting so Coursier cannot be opted out, by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/7712">#7712</a></li>
200201
</ul>
201202
<h3 id="dropped-dreprecations"><a class="header" href="#dropped-dreprecations">Dropped dreprecations</a></h3>
202203
<ul>

2.x/docs/en/print.html

+15-2
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,8 @@ <h2 id="changes-with-compatibility-implications"><a class="header" href="#change
13711371
<li>Bare settings are added to all subprojects, as opposed to just the root subproject, and thus replacing the role that <code>ThisBuild</code> has played. by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/6746">#6746</a></li>
13721372
<li><code>test</code> task is changed to be incremental test that can cache test results. Use <code>testFull</code> for full test by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/7686">#7686</a></li>
13731373
<li>sbt 2.x plugins are published with <code>_sbt2_3</code> suffix by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/7671">#7671</a></li>
1374-
<li>sbt 2.x adds <code>platform</code> setting so <code>ModuleID</code>'s <code>%%</code> operator can cross build on JVM as well as JS and Native, as opposed to <code>%%%</code> operator that was created in a plugin to workaround this issue. by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/6746">#6746</a></li>
1374+
<li>sbt 2.x adds <code>platform</code> setting so <code>ModuleID</code>'s <code>%%</code> operator can cross build on JVM as well as JS and Native, as opposed to <code>%%%</code> operator that was created in a plugin to workaround this issue, by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/6746">#6746</a></li>
1375+
<li>Dropped <code>useCoursier</code> setting so Coursier cannot be opted out, by <a href="https://github.com/eed3si9n">@eed3si9n</a> in <a href="https://github.com/sbt/sbt/pull/7712">#7712</a></li>
13751376
</ul>
13761377
<h3 id="dropped-dreprecations"><a class="header" href="#dropped-dreprecations">Dropped dreprecations</a></h3>
13771378
<ul>
@@ -1409,11 +1410,23 @@ <h2 id="bare-settings-changes"><a class="header" href="#bare-settings-changes">B
14091410
<p>In sbt 1.x bare settings were project settings that applied only to the root subproject. In sbt 2.x, the bare settings in <code>build.sbt</code> are common settings that are injected to <strong>all subprojects</strong>.</p>
14101411
</div>
14111412
</div>
1412-
<pre><code class="language-scala">name := "root"
1413+
<pre><code class="language-scala">name := "root" // every subprojects will be named root!
14131414
publish / skip := true
14141415
</code></pre>
14151416
<h3 id="migrating-thisbuild"><a class="header" href="#migrating-thisbuild">Migrating ThisBuild</a></h3>
14161417
<p>In sbt 2.x, bare settings settings should no longer be scoped to <code>ThisBuild</code>. One benefit of the new <em>common settings</em> over <code>ThisBuild</code> is that it would act in a more predictable delegation. These settings are inserted between plugins settings and those defined in <code>settings(...)</code>, meaning they can be used to define settings like <code>Compile / scalacOptions</code>, which was not possible with <code>ThisBuild</code>.</p>
1418+
<h2 id="cross-building-sbt-plugins"><a class="header" href="#cross-building-sbt-plugins">Cross building sbt plugins</a></h2>
1419+
<p>In sbt 2.x, if you cross build an sbt plugin with Scala 3.x and 2.12.x, it will automatically cross build against sbt 1.x and sbt 2.x:</p>
1420+
<pre><code class="language-scala">// using sbt 2.x
1421+
lazy val plugin = (projectMatrix in file("plugin"))
1422+
.enablePlugins(SbtPlugin)
1423+
.settings(
1424+
name := "sbt-vimquit",
1425+
)
1426+
.jvmPlatform(scalaVersions = Seq("3.3.3", "2.12.20"))
1427+
</code></pre>
1428+
<p>If you use <code>projectMatrix</code>, make sure to move the plugin to a subdirectory like <code>plugin/</code>. Otherwise, the synthetic root project will also pick up the <code>src/</code>.
1429+
Use sbt 1.10.2 or later to cross build from sbt 1.x side.</p>
14171430
<h2 id="migrating-to-slash-syntax"><a class="header" href="#migrating-to-slash-syntax">Migrating to slash syntax</a></h2>
14181431
<p>sbt 1.x supported both the sbt 0.13 style syntax and the slash syntax. sbt 2.x removes the support for the sbt 0.13 syntax, so use the slash syntax for both sbt shell and in <code>build.sbt</code>:</p>
14191432
<pre><code class="language-scala">&lt;project-id&gt; / Config / intask / key

2.x/docs/en/searchindex.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

2.x/docs/en/searchindex.json

+1-1
Large diffs are not rendered by default.

sitemap.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,49 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://www.scala-sbt.org/support.html</loc>
5-
<lastmod>2024-09-29</lastmod>
5+
<lastmod>2024-10-04</lastmod>
66
<changefreq>weekly</changefreq>
77
<priority>1.0</priority>
88
</url>
99
<url>
1010
<loc>https://www.scala-sbt.org/404.html</loc>
11-
<lastmod>2024-09-29</lastmod>
11+
<lastmod>2024-10-04</lastmod>
1212
<changefreq>weekly</changefreq>
1313
<priority>1.0</priority>
1414
</url>
1515
<url>
1616
<loc>https://www.scala-sbt.org/cookie.html</loc>
17-
<lastmod>2024-09-29</lastmod>
17+
<lastmod>2024-10-04</lastmod>
1818
<changefreq>weekly</changefreq>
1919
<priority>1.0</priority>
2020
</url>
2121
<url>
2222
<loc>https://www.scala-sbt.org/download.html</loc>
23-
<lastmod>2024-09-29</lastmod>
23+
<lastmod>2024-10-04</lastmod>
2424
<changefreq>weekly</changefreq>
2525
<priority>1.0</priority>
2626
</url>
2727
<url>
2828
<loc>https://www.scala-sbt.org/thank-you.html</loc>
29-
<lastmod>2024-09-29</lastmod>
29+
<lastmod>2024-10-04</lastmod>
3030
<changefreq>never</changefreq>
3131
<priority>0.0</priority>
3232
</url>
3333
<url>
3434
<loc>https://www.scala-sbt.org/community.html</loc>
35-
<lastmod>2024-09-29</lastmod>
35+
<lastmod>2024-10-04</lastmod>
3636
<changefreq>weekly</changefreq>
3737
<priority>1.0</priority>
3838
</url>
3939
<url>
4040
<loc>https://www.scala-sbt.org/index.html</loc>
41-
<lastmod>2024-09-29</lastmod>
41+
<lastmod>2024-10-04</lastmod>
4242
<changefreq>weekly</changefreq>
4343
<priority>1.0</priority>
4444
</url>
4545
<url>
4646
<loc>https://www.scala-sbt.org/learn.html</loc>
47-
<lastmod>2024-09-29</lastmod>
47+
<lastmod>2024-10-04</lastmod>
4848
<changefreq>weekly</changefreq>
4949
<priority>1.0</priority>
5050
</url>

sitemap.xml.gz

0 Bytes
Binary file not shown.

sitemap_index.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<sitemap>
44
<loc>https://www.scala-sbt.org/sitemap.xml.gz</loc>
5-
<lastmod>2024-09-29</lastmod>
5+
<lastmod>2024-10-04</lastmod>
66
</sitemap>
77
<sitemap>
88
<loc>https://www.scala-sbt.org/1.x/sitemap.xml.gz</loc>
9-
<lastmod>2024-09-29</lastmod>
9+
<lastmod>2024-10-04</lastmod>
1010
</sitemap>
1111
</sitemapindex>

sitemap_index.xml.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)