0

In my build.sbt a compilation phase depends on running scapegoat inspection

(compile in Compile) := (compile in Compile).dependsOn(scapegoat).value

I'm trying to introduce a new task for running tests (for development purposes to speed things up) that does not depend on scapegoat like this:

lazy val fastTests = taskKey[Unit]("")

fastTests := {
  scapegoat in Compile := {}
  (test in Test).value
}

but gets ignored

stanislav.chetvertkov
  • 1,620
  • 3
  • 13
  • 24

1 Answers1

1

You cannot do it with a task because tasks cannot change settings. You can solve it either with different configurations or with a command (which can change settings). See for example:

laughedelic
  • 6,230
  • 1
  • 32
  • 41