Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions examples/votingapp/project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import sbt._

object dependencies {
val addResolvers = Seq(
"52north for postgis" at "http://52north.org/maven/repo/releases/",
"jmcardon at bintray" at "https://dl.bintray.com/jmcardon/tsec",
Resolver.sonatypeRepo("releases")
"52north for postgis".at("http://52north.org/maven/repo/releases/"),
"jmcardon at bintray".at("https://dl.bintray.com/jmcardon/tsec"),
Resolver.sonatypeRepo("releases"),
)

val exclusions = Seq(
// see https://github.com/tpolecat/doobie/issues/568
ExclusionRule("org.typelevel", "scala-library")
ExclusionRule("org.typelevel", "scala-library"),
)

val compilerPlugins = Seq(
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.4")
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.4"),
)

val bcrypt = "3.1"
Expand All @@ -27,7 +27,7 @@ object dependencies {
val h4sm = "0.0.8"
val fs2 = "0.10.6"
val http4s = "0.18.21"
val logback = "1.2.3"
val logback = "1.2.8"
val pureConfig = "0.9.2"
val scalaCheck = "1.14.0"
val scalaTest = "3.0.8"
Expand All @@ -38,32 +38,32 @@ object dependencies {
"org.http4s" %% "http4s-blaze-server",
"org.http4s" %% "http4s-blaze-client",
"org.http4s" %% "http4s-circe",
"org.http4s" %% "http4s-dsl"
"org.http4s" %% "http4s-dsl",
).map(_ % dependencies.http4s) ++ Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser",
"io.circe" %% "circe-java8"
"io.circe" %% "circe-java8",
).map(_ % dependencies.circe)

val testDeps = Seq(
"org.scalatest" %% "scalatest" % scalaTest,
"org.tpolecat" %% "doobie-scalatest" % doobie,
"org.scalacheck" %% "scalacheck" % scalaCheck
"org.scalacheck" %% "scalacheck" % scalaCheck,
).map(_ % "test")

val dbDeps = Seq(
"org.flywaydb" % "flyway-core" % flyway,
"org.postgresql" % "postgresql" % "42.2.2"
"org.postgresql" % "postgresql" % "42.2.2",
) ++ Seq(
"org.tpolecat" %% "doobie-core",
"org.tpolecat" %% "doobie-postgres",
"org.tpolecat" %% "doobie-hikari"
"org.tpolecat" %% "doobie-hikari",
).map(_ % doobie)

val commonDeps = Seq(
"com.github.pureconfig" %% "pureconfig" % pureConfig,
"ch.qos.logback" % "logback-classic" % logback,
"ch.qos.logback" % "logback-classic" % logback,
"org.typelevel" %% "cats-core" % cats,
"org.typelevel" %% "cats-effect" % catsEffect,
"co.fs2" %% "fs2-core" % fs2,
Expand All @@ -72,7 +72,6 @@ object dependencies {
val h4smodules = Seq(
"h4sm-db",
"h4sm-auth",
"h4sm-features"
"h4sm-features",
).map("com.clovellytech" %% _ % h4sm)
}

40 changes: 21 additions & 19 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import scalajsbundler.sbtplugin.ScalaJSBundlerPlugin
import scalajsbundler.sbtplugin.ScalaJSBundlerPlugin.autoImport._


object dependencies {

lazy val copyFastOptJS =
TaskKey[Unit]("copyFastOptJS", "Copy javascript files to target directory")

lazy val copyFastOptJS = TaskKey[Unit]("copyFastOptJS", "Copy javascript files to target directory")

val withTests : String = "compile->compile;test->test"
val inTestOnly : String = "test->test"
val withTests: String = "compile->compile;test->test"
val inTestOnly: String = "test->test"

val scala212 = "2.12.12"
val scala213 = "2.13.3"
Expand All @@ -23,7 +22,7 @@ object dependencies {
lazy val JvmTest = config("jvm").extend(Test)

val addResolvers = Seq(
Resolver.sonatypeRepo("public")
Resolver.sonatypeRepo("public"),
)

object versions {
Expand All @@ -43,7 +42,7 @@ object dependencies {
val janino = "3.1.2"
val kindProjector212 = "0.10.3"
val kindProjector213 = "0.11.0"
val logback = "1.2.3"
val logback = "1.2.8"
val macroParadise = "2.1.1"
val postgres = "42.2.18"
val scalaCheck = "1.15.2"
Expand All @@ -56,19 +55,22 @@ object dependencies {
}

def compilerPlugins = Seq(
compilerPlugin("com.olegpy" %% "better-monadic-for" % versions.betterMonadicFor)
compilerPlugin("com.olegpy" %% "better-monadic-for" % versions.betterMonadicFor),
)

def compilerPluginsForVersion(version: String) =
CrossVersion.partialVersion(version) match {
case Some((2, major)) if major < 13 =>
compilerPlugins ++ Seq(
compilerPlugin("org.scalamacros" % "paradise" % versions.macroParadise cross CrossVersion.full),
compilerPlugin("org.typelevel" %% "kind-projector" % versions.kindProjector212)
compilerPlugin(
("org.scalamacros" % "paradise" % versions.macroParadise).cross(CrossVersion.full),
),
compilerPlugin("org.typelevel" %% "kind-projector" % versions.kindProjector212),
)
case Some((2, major)) if major == 13 =>
compilerPlugins ++ Seq(
compilerPlugin("org.typelevel" % s"kind-projector_$version" % versions.kindProjector213),
)
case Some((2, major)) if major == 13 => compilerPlugins ++ Seq(
compilerPlugin("org.typelevel" % s"kind-projector_$version" % versions.kindProjector213)
)
case _ => compilerPlugins
}

Expand All @@ -77,7 +79,7 @@ object dependencies {
"http4s-blaze-server",
"http4s-blaze-client",
"http4s-circe",
"http4s-dsl"
"http4s-dsl",
).map("org.http4s" %% _ % versions.http4s)

val testDeps = Seq(
Expand All @@ -92,11 +94,11 @@ object dependencies {

val dbDeps = Seq(
"org.flywaydb" % "flyway-core" % versions.flyway,
"org.postgresql" % "postgresql" % versions.postgres
"org.postgresql" % "postgresql" % versions.postgres,
) ++ Seq(
"doobie-core",
"doobie-postgres",
"doobie-hikari"
"doobie-hikari",
).map("org.tpolecat" %% _ % versions.doobie)

val commonDeps = Seq(
Expand All @@ -105,7 +107,7 @@ object dependencies {
"cats-mtl-core" -> versions.catsMtl,
).map(("org.typelevel" %% (_: String) % (_: String)).tupled) ++ Seq(
"org.apache.commons" % "commons-lang3" % versions.apacheLang3,
"ch.qos.logback" % "logback-classic" % versions.logback,
"ch.qos.logback" % "logback-classic" % versions.logback,
"org.codehaus.janino" % "janino" % versions.janino,
"org.typelevel" %% "simulacrum" % versions.simulacrum,
) ++ Seq(
Expand All @@ -114,7 +116,7 @@ object dependencies {
"circe-parser",
// "circe-java8"
).map("io.circe" %% _ % versions.circe) ++ Seq(
"io.circe" %% "circe-config" % versions.circeConfig
"io.circe" %% "circe-config" % versions.circeConfig,
)

val authDeps = Seq(
Expand All @@ -126,6 +128,6 @@ object dependencies {
"tsec-hash-jca",
"tsec-jwt-mac",
"tsec-jwt-sig",
"tsec-http4s"
"tsec-http4s",
).map("com.clovellytech" %% _ % versions.tsec)
}