-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
45 lines (37 loc) · 1.49 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name := "play-example"
version := "0.0.1"
scalaVersion := "2.13.2"
lazy val root = (project in file(".")).enablePlugins(PlayScala).disablePlugins(PlayFilters)
val myDeps = Seq(
guice,
"org.slf4j" % "slf4j-api" % "1.7.26",
"ch.qos.logback" % "logback-classic" % "1.2.3",
"org.webjars" % "bootstrap" % "3.4.1",
"org.scalatest" %% "scalatest" % "3.0.8" % "test"
)
libraryDependencies ++= {
// Code to print out information that you can use to set up Bazel dependencies.
println("Add the following lines to your maven_install definition:")
myDeps.foreach { dep =>
val (suffix, postfix) = dep.crossVersion match {
case b: Binary =>
("_%s", " % scala_binary_version")
case _ =>
("", "")
}
println(s""""${dep.organization}:${dep.name}${suffix}:${dep.revision}"${postfix}, ${dep.configurations.getOrElse("")} ${if (dep.exclusions.nonEmpty) s" ${dep.exclusions}" else ""}""")
}
println("")
println("Add the following lines to the dependencies in your BUILD file:")
myDeps.foreach { dep =>
def cleanup(s: String) = s.replace(".", "_").replace("-", "_")
val (suffix, postfix) = dep.crossVersion match {
case b: Binary =>
("_%s", " % scala_binary_suffix")
case _ =>
("", "")
}
println(s""""@maven//:${cleanup(dep.organization)}_${cleanup(dep.name)}${suffix}"${postfix},""")
}
myDeps
}