Reputation: 10884
How to state that a library should be used for Test
and IntegrationTest
without falling back to strings like "test,it"
?
Example:
"org.scalamock" %% "scalamock-scalatest-support" % "3.3.0" % Test,
"org.scalatest" %% "scalatest" % scalaTestVersion % "test,it" //<- how to make this safer
Upvotes: 4
Views: 162
Reputation: 358
The safest way I found to code that is using a Seq and mkstring like that:
"dependency" % Seq(Test, IntegrationTest).mkString(",")
It is a workaround and I'm not sure it's a good practice to have that kind of logic in a build.
Upvotes: 1