In my project, I want to use some code from GitHub. The dependency is defined in Build.scala as follows:
object BuildSettings {
val buildVersion = "1.0-SNAPSHOT"
val buildScalaVersion = "2.9.1"
val buildName = "PageAnalyzer"
val buildSettings = Defaults.defaultSettings ++ Seq (
organization := buildOrganization,
version := buildVersion,
scalaVersion := buildScalaVersion,
name := buildName
)
}
object PageAnalyzerBuild extends Build {
lazy val root = Project (
"root",
file ("."),
settings = BuildSettings.buildSettings
) dependsOn (depProject)
val depProject = RootProject(uri("git://github.com/me/some.git"))
}
For some reasons, I have to build the root project with Scala 2.9.x. In SBT 0.13, the depProject will be build with 2.10.x and the dependency cannot be build. root project tries to look for some some_2.9.1, but only some_2.10 is built.
Change scalaVersion to 2.10.x works fine. But I have to build the root project with 2.9.x. Is there any way to define scalaVersion for depProject cloned from git?
You should be fine with scalaVersion in [project-id] := "2.9.0" where project-id is the project identifier from depProject or just use depProject for in. Run projects to know the names of available projects and pick the proper one for in.
It appears similar to Setting javac options for SBT dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With