Skip to content

Commit 758b7b3

Browse files
It also adds dependencies in the jsSettings
1 parent 4e658a9 commit 758b7b3

File tree

2 files changed

+26
-25
lines changed

2 files changed

+26
-25
lines changed

build.sbt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,23 @@ lazy val `evaluator-shared-js` = `evaluator-shared`.js
2020
lazy val scalaJSSettings = Seq(
2121
requiresDOM := false,
2222
scalaJSUseRhino := false,
23-
jsEnv := NodeJSEnv().value
23+
jsEnv := NodeJSEnv().value,
24+
libraryDependencies ++= Seq(
25+
"fr.hmil" %%% "roshttp" % v('roshttp),
26+
"org.typelevel" %%% "cats-free" % v('cats),
27+
"io.circe" %%% "circe-core" % v('circe),
28+
"io.circe" %%% "circe-generic" % v('circe),
29+
"io.circe" %%% "circe-parser" % v('circe)
30+
)
2431
)
2532

2633
lazy val `evaluator-client` = (crossProject in file("client"))
2734
.dependsOn(`evaluator-shared`)
2835
.enablePlugins(AutomateHeaderPlugin)
2936
.settings(
3037
name := "evaluator-client",
31-
libraryDependencies <++= libraryVersions { v => Seq(
38+
libraryDependencies ++= Seq(
39+
"fr.hmil" %% "roshttp" % v('roshttp),
3240
"org.typelevel" %% "cats-free" % v('cats),
3341
"io.circe" %% "circe-core" % v('circe),
3442
"io.circe" %% "circe-generic" % v('circe),
@@ -38,8 +46,6 @@ lazy val `evaluator-client` = (crossProject in file("client"))
3846
// Testing libraries
3947
"org.scalatest" %% "scalatest" % v('scalaTest) % "test"
4048
)
41-
},
42-
libraryDependencies += "fr.hmil" %%% "roshttp" % "1.1.0"
4349
)
4450
.jsSettings(scalaJSSettings: _*)
4551

@@ -53,7 +59,7 @@ lazy val `evaluator-server` = (project in file("server"))
5359
.settings(noPublishSettings: _*)
5460
.settings(
5561
name := "evaluator-server",
56-
libraryDependencies <++= libraryVersions { v => Seq(
62+
libraryDependencies ++= Seq(
5763
"io.monix" %% "monix" % v('monix),
5864
"org.http4s" %% "http4s-dsl" % v('http4s),
5965
"org.http4s" %% "http4s-blaze-server" % v('http4s),
@@ -70,7 +76,6 @@ lazy val `evaluator-server` = (project in file("server"))
7076
"io.get-coursier" %% "coursier-cache" % v('coursier),
7177
"org.scalatest" %% "scalatest" % v('scalaTest) % "test"
7278
)
73-
}
7479
)
7580
.settings(compilerDependencySettings: _*)
7681

project/EvaluatorBuild.scala

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,21 @@ object EvaluatorBuild extends AutoPlugin {
1414

1515
object autoImport {
1616

17-
val libraryVersions = settingKey[Map[Symbol, String]]("Common versions to be used for dependencies")
17+
val v = Map(
18+
'cats -> "0.6.1",
19+
'circe -> "0.5.0-M2",
20+
'config -> "1.3.0",
21+
'coursier -> "1.0.0-M12",
22+
'http4s -> "0.14.1",
23+
'jwtcore -> "0.8.0",
24+
'log4s -> "1.3.0",
25+
'monix -> "2.0-RC8",
26+
'roshttp -> "1.1.0",
27+
'scalacheck -> "1.12.5",
28+
'scalaTest -> "2.2.6",
29+
'slf4j -> "1.7.21"
30+
)
31+
1832

1933
def compilerDependencySettings = Seq(
2034
libraryDependencies ++= Seq(
@@ -31,7 +45,6 @@ object EvaluatorBuild extends AutoPlugin {
3145
override def projectSettings =
3246
baseSettings ++
3347
reformatOnCompileSettings ++
34-
dependencySettings ++
3548
publishSettings ++
3649
miscSettings
3750

@@ -55,23 +68,6 @@ object EvaluatorBuild extends AutoPlugin {
5568
javacOptions ++= Seq("-encoding", "UTF-8", "-Xlint:-options")
5669
)
5770

58-
private[this] def dependencySettings = Seq(
59-
libraryVersions := Map(
60-
'cats -> "0.6.1",
61-
'circe -> "0.5.0-M2",
62-
'config -> "1.3.0",
63-
'coursier -> "1.0.0-M12",
64-
'http4s -> "0.14.1",
65-
'jwtcore -> "0.8.0",
66-
'log4s -> "1.3.0",
67-
'monix -> "2.0-RC8",
68-
'roshttp -> "1.1.0",
69-
'scalacheck -> "1.12.5",
70-
'scalaTest -> "2.2.6",
71-
'slf4j -> "1.7.21"
72-
)
73-
)
74-
7571
private[this] def miscSettings = Seq(
7672
headers <<= (name, version) { (name, version) => Map(
7773
"scala" -> (

0 commit comments

Comments
 (0)