简体   繁体   English

什么是build.sbt中的libraryDependencies <+ = scalaVersion()?

[英]What is libraryDependencies <+= scalaVersion() in my build.sbt?

In my build.sbt, I have this line. 在我的build.sbt中,我有这行。

libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _)
libraryDependencies += "org.parboiled" %% "parboiled" % "2.1.0"

I can't remember what the first line means. 我不记得the first line是什么意思。 How can I combine these 2 lines? 如何合并这两行?

In the later sbts, I am pretty sure from 0.13.x onwards, you can use 在以后的sbts中,我很确定从0.13.x开始,您可以使用

    libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
    "org.parboiled" %% "parboiled" % "2.1.0"
    )

http://www.scala-sbt.org/0.13/tutorial/More-About-Settings.html#Computing+a+value+based+on+other+keys%E2%80%99+values http://www.scala-sbt.org/0.13/tutorial/More-About-Settings.html#Computing+a+value+based+on+other+keys%E2%80%99+values

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM