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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package h4sm.db.config

import scala.util.Try
import cats.effect.Sync
import cats.implicits._
import cats.syntax.all._
import javax.sql.DataSource
import org.flywaydb.core.Flyway
import org.flywaydb.core.api.FlywayException
Expand Down
2 changes: 1 addition & 1 deletion modules/db/jvm/src/main/scala/h4sm/db/config/package.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package h4sm.db

import cats.{Applicative, ApplicativeError, Functor}
import cats.implicits._
import cats.syntax.all._
import cats.mtl.{ApplicativeAsk, DefaultApplicativeAsk}
import io.circe.Decoder
import io.circe.config.parser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package h4sm.featurerequests.comm

import cats.implicits._
import cats.syntax.all._
import h4sm.featurerequests.comm.domain.features.FeatureRequest
import h4sm.testutil.arbitraries._
import org.scalacheck.Arbitrary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package h4sm.testutil

import cats.implicits._
import cats.syntax.all._
import java.time.Instant
import org.scalacheck.{Arbitrary, Gen}
import org.scalacheck.cats.implicits._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package testutil.infrastructure.endpoints

import org.http4s._
import cats.effect.Sync
import cats.implicits._
import cats.syntax.all._

sealed abstract class ClientError extends Throwable with Product with Serializable
final case class UriError(message: String) extends ClientError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package testutil
import java.sql.DriverManager

import cats.effect.{Async, ContextShift, Sync}
import cats.implicits._
import cats.syntax.all._
import doobie.util.transactor.Transactor
import h4sm.db.config.DatabaseConfig
import io.circe.config.parser
Expand Down
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,14 +22,14 @@ object dependencies {
lazy val JvmTest = config("jvm").extend(Test)

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

object versions {
val apacheLang3 = "3.11"
val bcrypt = "3.1"
val betterMonadicFor = "0.3.1"
val cats = "2.1.1"
val cats = "2.7.0"
val catsScalacheck = "0.2.0.1"
val catsMtl = "0.7.1"
val catsEffect = "2.3.0"
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)
}