-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addPluginSbtFile command #4211
addPluginSbtFile command #4211
Conversation
@Duhemm Looks like this could replace https://github.com/scalacenter/load-plugin for the IDE usecase. |
|
Fixes sbt#1502 This adds `--addPluginSbtFile=<file>` command, which adds the given .sbt file to the plugin build. Using this mechanism editors or IDEs can start a build with required plugin. ``` $ cat /tmp/extra.sbt addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.7") $ sbt --addPluginSbtFile=/tmp/extra.sbt ... sbt:helloworld> plugins In file:/xxxx/hellotest/ ... sbtassembly.AssemblyPlugin: enabled in root ```
Nice! |
Nice. Can it be set in |
@@ -96,6 +97,14 @@ $HelpCommand <regular expression> | |||
The order is preserved between all early commands, so `sbt "early(a)" "early(b)"` executes `a` and `b` in order. | |||
""" | |||
|
|||
def addPluginSbtFileHelp = { | |||
val brief = | |||
(s"--$AddPluginSbtFileCommand=<file>", "Adds the given *.sbt file to the plugin build.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aren't most options with a single dash (at least in the help)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The single line convention comes from Java, and since Java 9 is updating to more UNIX --
style, I am following the cargo cult.
[0.13] port sddPluginSbtFile command from #4211
In IntelliJ i keep getting the following, it seems it doesn't support space in a folder specification. I can't find where to change the path:
|
@matt-leaguecio Looks like a bug in the Scala plugin. I've created an issue: |
Ref sbt#4211 Fixes sbt#4395 Fixes sbt#4600 This is a reimplementation of `--addPluginSbtFile`. sbt#4211 implemented the command to load extra `*.sbt` files as part of the global plugin subproject. That had the unwanted side effects of not working when `.sbt/1.0/plugins` directory does not exist. This changes the strategy to load the `*.sbt` files as part of the meta build. ``` $ sbt -Dsbt.global.base=/tmp/hello/global --addPluginSbtFile=/tmp/plugins/plugin.sbt [info] Loading settings for project hello-build from plugin.sbt ... [info] Loading project definition from /private/tmp/hello/project sbt:hello> plugins In file:/private/tmp/hello/ sbt.plugins.IvyPlugin: enabled in root sbt.plugins.JvmPlugin: enabled in root sbt.plugins.CorePlugin: enabled in root sbt.ScriptedPlugin sbt.plugins.SbtPlugin sbt.plugins.SemanticdbPlugin: enabled in root sbt.plugins.JUnitXmlReportPlugin: enabled in root sbt.plugins.Giter8TemplatePlugin: enabled in root sbtvimquit.VimquitPlugin: enabled in root ```
Ref sbt#4211 Fixes sbt#4395 Fixes sbt#4600 This is a reimplementation of `--addPluginSbtFile`. sbt#4211 implemented the command to load extra `*.sbt` files as part of the global plugin subproject. That had the unwanted side effects of not working when `.sbt/1.0/plugins` directory does not exist. This changes the strategy to load the `*.sbt` files as part of the meta build. ``` $ sbt -Dsbt.global.base=/tmp/hello/global --addPluginSbtFile=/tmp/plugins/plugin.sbt [info] Loading settings for project hello-build from plugin.sbt ... [info] Loading project definition from /private/tmp/hello/project sbt:hello> plugins In file:/private/tmp/hello/ sbt.plugins.IvyPlugin: enabled in root sbt.plugins.JvmPlugin: enabled in root sbt.plugins.CorePlugin: enabled in root sbt.ScriptedPlugin sbt.plugins.SbtPlugin sbt.plugins.SemanticdbPlugin: enabled in root sbt.plugins.JUnitXmlReportPlugin: enabled in root sbt.plugins.Giter8TemplatePlugin: enabled in root sbtvimquit.VimquitPlugin: enabled in root ```
Ref sbt#4211 Fixes sbt#4395 Fixes sbt#4600 This is a reimplementation of `--addPluginSbtFile`. sbt#4211 implemented the command to load extra `*.sbt` files as part of the global plugin subproject. That had the unwanted side effects of not working when `.sbt/1.0/plugins` directory does not exist. This changes the strategy to load the `*.sbt` files as part of the meta build. ``` $ sbt -Dsbt.global.base=/tmp/hello/global --addPluginSbtFile=/tmp/plugins/plugin.sbt [info] Loading settings for project hello-build from plugin.sbt ... [info] Loading project definition from /private/tmp/hello/project sbt:hello> plugins In file:/private/tmp/hello/ sbt.plugins.IvyPlugin: enabled in root sbt.plugins.JvmPlugin: enabled in root sbt.plugins.CorePlugin: enabled in root sbt.ScriptedPlugin sbt.plugins.SbtPlugin sbt.plugins.SemanticdbPlugin: enabled in root sbt.plugins.JUnitXmlReportPlugin: enabled in root sbt.plugins.Giter8TemplatePlugin: enabled in root sbtvimquit.VimquitPlugin: enabled in root ```
Ref sbt#4211 Fixes sbt#4395 Fixes sbt#4600 This is a reimplementation of `--addPluginSbtFile`. sbt#4211 implemented the command to load extra `*.sbt` files as part of the global plugin subproject. That had the unwanted side effects of not working when `.sbt/1.0/plugins` directory does not exist. This changes the strategy to load the `*.sbt` files as part of the meta build. ``` $ sbt -Dsbt.global.base=/tmp/hello/global --addPluginSbtFile=/tmp/plugins/plugin.sbt [info] Loading settings for project hello-build from plugin.sbt ... [info] Loading project definition from /private/tmp/hello/project sbt:hello> plugins In file:/private/tmp/hello/ sbt.plugins.IvyPlugin: enabled in root sbt.plugins.JvmPlugin: enabled in root sbt.plugins.CorePlugin: enabled in root sbt.ScriptedPlugin sbt.plugins.SbtPlugin sbt.plugins.SemanticdbPlugin: enabled in root sbt.plugins.JUnitXmlReportPlugin: enabled in root sbt.plugins.Giter8TemplatePlugin: enabled in root sbtvimquit.VimquitPlugin: enabled in root ```
Fixes #1502
This adds
--addPluginSbtFile=<file>
command, which adds the given .sbt file to the plugin build.Using this mechanism editors or IDEs can start a build with required plugin.
/cc @jastice