-
Notifications
You must be signed in to change notification settings - Fork 1k
Updated libraryDependencies config line #1510
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
Conversation
@@ -20,7 +20,7 @@ This assumes you know [how to build a project in IntelliJ](building-a-scala-proj | |||
1. Add the ScalaTest dependency: | |||
1. Add the ScalaTest dependency to your `build.sbt` file: | |||
``` | |||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % "test" | |||
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.8" |
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.
Why is % "test"
removed?
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.
Well, I just copied sbt line from Scaladex. Actually, adding % "test"
don't hurts.
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.
Yeah, http://www.scalatest.org/install suggests having % "test"
.
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.
But what's the purpose of % "test"
? The example work flawlessly with or without it.
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.
Often a dependency is used by your test code (in
src/test/scala
, which is compiled by theTest
configuration) but not your main code.If you want a dependency to show up in the classpath only for the
Test
configuration and not theCompile
configuration, add% "test"
[...]
https://www.scala-sbt.org/release/docs/Library-Dependencies.html#Per-configuration+dependencies
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.
Thank you!
thanks! |
No description provided.