简体   繁体   中英

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

In my build.sbt, I have this line.

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

I can't remember what the first line means. How can I combine these 2 lines?

In the later sbts, I am pretty sure from 0.13.x onwards, you can use

    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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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