Is there a way to disable a SBT plugin (an AutoPlugin) for a specific task.
For example, i would like to disable the plugin SCoverage while packaging.
I tried with:
coverageEnabled in `package` := false
But that does not work. So I look for a way to wholly disable the plugin.
No. By the time a task is being executed (in this case packageBin
task), the task dependency graph has been loaded from all auto plugins, and each setting/task wouldn't know if it came from a plugin or not. In general, you can't dynamically enable or disable plugins in sbt as of today (0.13.9).
Some plugins might add extension points specifically to override some behaviors (for example, test in assembly
), but built-in tasks such as packageBin
are not aware of the plugins.
I tried to propose a concept called build level, which might be related here, but it did not catch on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With