summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Lawson2020-06-18 11:53:58 -0700
committerGitHub2020-06-18 18:53:58 +0000
commit8eaf10edff0a7f58cce214ad1f13ad7cdb682aef (patch)
treed5368ac4ee1964d8142ce76254907fc3a3a16bd5
parent3a276c86f3f08ec586810672a70c7f4f41127c2e (diff)
Have defaultVersions specify complete ModuleIDs. (#1479)
-rw-r--r--build.sbt13
1 files changed, 8 insertions, 5 deletions
diff --git a/build.sbt b/build.sbt
index db2c9723..47925b6f 100644
--- a/build.sbt
+++ b/build.sbt
@@ -28,7 +28,9 @@ def javacOptionsVersion(scalaVersion: String): Seq[String] = {
}
}
-val defaultVersions = Map("firrtl" -> "1.4-SNAPSHOT")
+val defaultVersions = Seq(
+ "edu.berkeley.cs" %% "firrtl" % "1.4-SNAPSHOT"
+)
lazy val commonSettings = Seq (
resolvers ++= Seq(
@@ -50,11 +52,12 @@ lazy val commonSettings = Seq (
// this has to be a Task setting.
// Fortunately, allDependencies is a Task Setting, so we can modify that.
allDependencies := {
- allDependencies.value ++ Seq("firrtl").collect {
+ allDependencies.value ++ defaultVersions.collect {
// If we have an unmanaged jar file on the classpath, assume we're to use that,
- case dep: String if !(unmanagedClasspath in Compile).value.toString.contains(s"$dep.jar") =>
- // otherwise let sbt fetch the appropriate version.
- "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep))
+ case m: ModuleID if !(unmanagedClasspath in Compile).value.toString.contains(s"${m.name}.jar") =>
+ // otherwise let sbt fetch the appropriate artifact, possibly with a specific revision.
+ val mWithRevision = m.withRevision(sys.props.getOrElse(m.name + "Version", m.revision))
+ mWithRevision
}
}
)