mirror of https://github.com/sbt/sbt.git
add convenience methods for filtering settings and keys
This commit is contained in:
parent
3e9921a07a
commit
4305d94f5e
|
|
@ -1031,6 +1031,9 @@ trait BuildExtra extends BuildCommon
|
|||
/** Disables post-compilation hook for determining tests for tab-completion (such as for 'test-only').
|
||||
* This is useful for reducing test:compile time when not running test. */
|
||||
def noTestCompletion(config: Configuration = Test): Setting[_] = inConfig(config)( Seq(definedTests <<= Defaults.detectTests) ).head
|
||||
|
||||
def filterKeys(ss: Seq[Setting[_]], transitive: Boolean = false)(f: ScopedKey[_] => Boolean): Seq[Setting[_]] =
|
||||
ss filter ( s => f(s.key) && (!transitive || s.dependsOn.forall(f)) )
|
||||
}
|
||||
trait BuildCommon
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue