From b1ab9366d0564a6c3a5def5299b2c10b1b5676b1 Mon Sep 17 00:00:00 2001 From: Zak Patterson Date: Wed, 5 Jun 2019 18:22:11 -0500 Subject: [PATCH] Remove template dependencies file (#6) --- build.sbt | 19 +++++---- project/Dependencies.scala | 84 -------------------------------------- 2 files changed, 12 insertions(+), 91 deletions(-) delete mode 100644 project/Dependencies.scala diff --git a/build.sbt b/build.sbt index 8f55c9a..bc9fa35 100644 --- a/build.sbt +++ b/build.sbt @@ -1,21 +1,26 @@ -import dependencies._ import xerial.sbt.Sonatype._ cancelable in Global := true +val compilerPlugins = Seq( + addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.2"), + addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full) +) + +val versions = new { + val scalatest = "3.0.5" + val outwatch = "676f94a" +} + val commonSettings = Seq( organization := "com.clovellytech", version := Version.version, scalaVersion := Version.scalaVersion, - resolvers ++= addResolvers, scalacOptions ++= options.scalac, scalacOptions in (Compile, console) := options.scalacConsole, updateOptions := updateOptions.value.withLatestSnapshots(false) ) ++ compilerPlugins -val withTests : String = "compile->compile;test->test" -val testOnly : String = "test->test" - lazy val publishSettings = Seq( useGpg := true, publishMavenStyle := true, @@ -81,8 +86,8 @@ lazy val router = project webpackBundlingMode in fastOptJS := BundlingMode.LibraryOnly(), resolvers += "jitpack" at "https://jitpack.io", libraryDependencies ++= Seq( - "io.github.outwatch" % "outwatch" % "676f94a", - "org.scalatest" %%% "scalatest" % "3.0.5" % Test + "io.github.outwatch" % "outwatch" % versions.outwatch, + "org.scalatest" %%% "scalatest" % versions.scalatest % Test, ), copyFastOptJS := { val inDir = (crossTarget in (Compile, fastOptJS)).value diff --git a/project/Dependencies.scala b/project/Dependencies.scala deleted file mode 100644 index ce83b31..0000000 --- a/project/Dependencies.scala +++ /dev/null @@ -1,84 +0,0 @@ -import sbt._ -import sbt.librarymanagement.DependencyBuilders -import org.portablescala.sbtplatformdeps._ - -object dependencies { - val addResolvers = Seq( - "52north for postgis" at "http://52north.org/maven/repo/releases/", - Resolver.sonatypeRepo("releases"), - Resolver.sonatypeRepo("snapshots") - ) - - val compilerPlugins = Seq( - addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.9"), - addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full) - ) - - val bcrypt = "3.1" - val cats = "1.4.0" - val catsMtl = "0.4.0" - val catsEffect = "1.2.0" - val circe = "0.11.0" - val circeConfig = "0.6.1" - val doobie = "0.6.0" - val flyway = "5.2.4" - val fs2 = "1.0.2" - val h4sm = "0.0.17" - val http4s = "0.20.0-M5" - val logback = "1.2.3" - val monocle = "1.5.0" - val postgis = "1.3.3" - val postgres = "42.2.5" - val scalaCheck = "1.14.0" - val scalaTest = "3.0.5" - val simulacrum = "0.14.0" - - val httpDeps = Seq( - "http4s-blaze-server", - "http4s-blaze-client", - "http4s-circe", - "http4s-dsl" - ).map("org.http4s" %% _ % http4s) ++ Seq( - "circe-core", - "circe-generic", - "circe-parser", - "circe-java8" - ).map("io.circe" %% _ % circe) - - val testDeps = Seq( - "org.scalatest" %% "scalatest" % scalaTest, - "org.tpolecat" %% "doobie-scalatest" % doobie, - "org.scalacheck" %% "scalacheck" % scalaCheck, - "com.clovellytech" %% "h4sm-dbtesting" % h4sm - ) - - val testDepsInTestOnly = testDeps.map(_ % "test") - - val dbDeps = Seq( - "org.flywaydb" % "flyway-core" % flyway, - "org.postgresql" % "postgresql" % postgres, - "org.postgis" % "postgis-jdbc" % postgis - ) ++ Seq( - "doobie-core", - "doobie-postgres", - "doobie-hikari" - ).map("org.tpolecat" %% _ % doobie) - - val commonDeps = Seq( - "io.circe" %% "circe-config" % circeConfig, - "ch.qos.logback" % "logback-classic" % logback, - "com.github.mpilquist" %% "simulacrum" % simulacrum - ) ++ Seq( - "h4sm-auth", - "h4sm-files", - "h4sm-permissions" - ).map("com.clovellytech" %% _ % h4sm) ++ Seq( - "monocle-core", - "monocle-generic", - "monocle-macro", - "monocle-state", - "monocle-refined" - ).map("com.github.julien-truffaut" %% _ % monocle) - - val allDeps = httpDeps ++ dbDeps ++ commonDeps ++ testDepsInTestOnly -}