[sbt 0.13] Port sbt-cross-building's ^ and ^^ commands #3133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@jrudolph's sbt-cross-building is a plugin author's plugin. It adds cross command
^
and sbtVersion switch command^^
, similar to+
and++
,but for switching between multiple sbt versions across major versions. This PR merges these commands into sbt because the feature they provide is really useful as we migrate plugins to sbt 1.0.
sbtVersion switching
To switch the
sbtVersion in pluginCrossBuild
from the shell use:Your plugin will now build with sbt 1.0.0-M5 (and its Scala version 2.12.2).
sbt specific source directories
If you need to make changes specific to a sbt version, you can now include them into
src/main/scala-sbt-0.13
,and
src/main/scala-sbt-1.0.0-M5
, where the binary sbt version number is used as postfix.plugin cross command
To run a command across multiple sbt versions, set:
Then, run:
notes
The idea of merging this in to sbt was first brought up in 2013 jrudolph/sbt-cross-building#17, and last year #2619.