diff --git a/src/reference/changes/migrating-from-sbt-1.x.md b/src/reference/changes/migrating-from-sbt-1.x.md index 6899612d..8ffaea75 100644 --- a/src/reference/changes/migrating-from-sbt-1.x.md +++ b/src/reference/changes/migrating-from-sbt-1.x.md @@ -23,7 +23,7 @@ In sbt 1.x bare settings were project settings that applied only to the root sub ``` ```scala -name := "root" +name := "root" // every subprojects will be named root! publish / skip := true ``` @@ -31,6 +31,23 @@ publish / skip := true In sbt 2.x, bare settings settings should no longer be scoped to `ThisBuild`. One benefit of the new _common settings_ over `ThisBuild` is that it would act in a more predictable delegation. These settings are inserted between plugins settings and those defined in `settings(...)`, meaning they can be used to define settings like `Compile / scalacOptions`, which was not possible with `ThisBuild`. +Cross building sbt plugins +-------------------------- + +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: + +```scala +// using sbt 2.x +lazy val plugin = (projectMatrix in file("plugin")) + .enablePlugins(SbtPlugin) + .settings( + name := "sbt-vimquit", + ) + .jvmPlatform(scalaVersions = Seq("3.3.3", "2.12.20")) +``` + +Use sbt 1.10.2 or later to cross build from sbt 1.x side. + Migrating to slash syntax ------------------------- diff --git a/src/reference/changes/sbt-2.0-change-summary.md b/src/reference/changes/sbt-2.0-change-summary.md index 448219e0..6a68ca08 100644 --- a/src/reference/changes/sbt-2.0-change-summary.md +++ b/src/reference/changes/sbt-2.0-change-summary.md @@ -16,7 +16,8 @@ See also [Migrating from sbt 1.x](./migrating-from-sbt-1.x.md). - Bare settings are added to all subprojects, as opposed to just the root subproject, and thus replacing the role that `ThisBuild` has played. by [@eed3si9n][@eed3si9n] in [#6746][6746] - `test` task is changed to be incremental test that can cache test results. Use `testFull` for full test by [@eed3si9n][@eed3si9n] in [#7686][7686] - sbt 2.x plugins are published with `_sbt2_3` suffix by [@eed3si9n][@eed3si9n] in [#7671][7671] -- sbt 2.x adds `platform` setting so `ModuleID`'s `%%` operator can cross build on JVM as well as JS and Native, as opposed to `%%%` operator that was created in a plugin to workaround this issue. by [@eed3si9n][@eed3si9n] in [#6746][6746] +- sbt 2.x adds `platform` setting so `ModuleID`'s `%%` operator can cross build on JVM as well as JS and Native, as opposed to `%%%` operator that was created in a plugin to workaround this issue, by [@eed3si9n][@eed3si9n] in [#6746][6746] +- Dropped `useCoursier` setting so Coursier cannot be opted out, by [@eed3si9n][@eed3si9n] in [#7712][7712] ### Dropped dreprecations @@ -41,5 +42,6 @@ See also: [7671]: https://github.com/sbt/sbt/pull/7671 [7686]: https://github.com/sbt/sbt/pull/7686 [7700]: https://github.com/sbt/sbt/pull/7700 + [7712]: https://github.com/sbt/sbt/pull/7712 [@eed3si9n]: https://github.com/eed3si9n [@adpi2]: https://github.com/adpi2