1
で変数を使用することができます私は私のプロジェクトのためにbuild.sbtを作成していますし、それがはどのように私はSBT
libraryDependencies ++= Seq(
"com.typesafe.akka" % "akka-actor_2.11" % "2.3.15",
"org.scalaz" % "scalaz-core_2.11" % "7.2.0",
"org.scalactic" % "scalactic_2.11" % "2.2.6" ,
"org.scalatest" % "scalatest_2.11" % "2.2.6" % "test",
"org.scalamock" % "scalamock-scalatest-support_2.11" % "3.2.2" % "test",
"org.springframework" % "spring-context" % "4.1.6.RELEASE",
"org.springframework" % "spring-beans" % "4.1.6.RELEASE",
"org.springframework" % "spring-core" % "4.1.6.RELEASE",
"org.springframework" % "spring-context" % "4.1.6.RELEASE",
"org.springframework" % "spring-web" % "4.1.6.RELEASE",
"com.google.guava" % "guava" % "14.0.1",
"com.google.code.gson" % "gson" % "2.3",
"commons-lang" % "commons-lang" % "2.5",
"net.sf.opencsv" % "opencsv" % "2.3",
"com.thoughtworks.xstream" % "xstream" % "1.4.8",
"commons-io" % "commons-io" % "1.4",
"commons-codec" % "commons-codec" % "1.6",
"commons-collections" % "commons-collections" % "3.2.2",
"commons-logging" % "commons-logging" % "1.1.1",
"org.apache.httpcomponents" % "httpclient" % "4.3.3",
"org.apache.httpcomponents" % "httpmime" % "4.3.3",
"jmdns" % "jmdns" % "0.2",
"com.sun.mail" % "javax.mail" % "1.5.4",
"junit" % "junit" % "4.12" % "test"
)
のように言及した依存関係は、私が他の場所で変数としてバージョンを指定し、それらの(変数)を参照したいました依存関係の中で。 これはgradleのように行うことができますか?
SBTビルドは単なるコードなので、その中で何かできます。例えば。いくつかのファイルやenv変数を読み込み、 'libraryDependencies'でそれらを使用するだけです – amorfis