build.sbt 3.5 KB
Newer Older
D
Dejan Mijić 已提交
1 2
import BuildHelper._

D
Dejan Mijić 已提交
3 4
Global / onChangedBuildSource := ReloadOnSourceChanges

D
Dejan Mijić 已提交
5 6 7 8 9 10
inThisBuild(
  List(
    organization := "dev.zio",
    homepage := Some(url("https://github.com/zio/zio-redis/")),
    licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
    developers := List(
D
Dejan Mijić 已提交
11
      Developer("jdegoes", "John De Goes", "john@degoes.net", url("https://degoes.net")),
D
Dejan Mijić 已提交
12
      Developer("mijicd", "Dejan Mijic", "dmijic@acm.org", url("https://github.com/mijicd"))
D
Dejan Mijić 已提交
13
    ),
D
Dejan Mijić 已提交
14
    pgpPassphrase := sys.env.get("PGP_PASSPHRASE").map(_.toArray),
D
Dejan Mijić 已提交
15 16 17 18
    pgpPublicRing := file("/tmp/public.asc"),
    pgpSecretRing := file("/tmp/secret.asc"),
    scmInfo := Some(
      ScmInfo(url("https://github.com/zio/zio-redis/"), "scm:git:git@github.com:zio/zio-redis.git")
S
ShankarShastri 已提交
19 20 21
    ),
    semanticdbEnabled := true,
    semanticdbVersion := scalafixSemanticdb.revision,
22
    scalafixDependencies += "com.nequissimus" %% "sort-imports" % "0.5.5"
D
Dejan Mijić 已提交
23 24 25
  )
)

S
ShankarShastri 已提交
26
addCommandAlias("prepare", "fix; fmt")
D
Dejan Mijić 已提交
27 28
addCommandAlias("fmt", "all scalafmtSbt scalafmtAll")
addCommandAlias("fmtCheck", "all scalafmtSbtCheck scalafmtCheckAll")
D
Dejan Mijić 已提交
29 30
addCommandAlias("fix", "scalafixAll")
addCommandAlias("fixCheck", "scalafixAll --check")
D
Dejan Mijić 已提交
31 32
addCommandAlias("testJVM", ";redis/test;benchmarks/test:compile")
addCommandAlias("testJVM211", ";redis/test")
P
Paul Daniels 已提交
33

D
Dejan Mijić 已提交
34
lazy val root =
P
Paul Daniels 已提交
35 36
  project
    .in(file("."))
D
Dejan Mijić 已提交
37
    .settings(skip in publish := true)
38
    .aggregate(redis, benchmarks, example)
D
Dejan Mijić 已提交
39 40 41 42 43

lazy val redis =
  project
    .in(file("redis"))
    .enablePlugins(BuildInfoPlugin)
D
Dejan Mijić 已提交
44 45
    .settings(stdSettings("zio-redis"))
    .settings(buildInfoSettings("zio.redis"))
P
Paul Daniels 已提交
46 47
    .settings(
      libraryDependencies ++= Seq(
48
        "dev.zio" %% "zio-streams"  % "1.0.3",
49
        "dev.zio" %% "zio-logging"  % "0.5.3",
D
Dejan Mijić 已提交
50 51
        "dev.zio" %% "zio-test"     % "1.0.3" % Test,
        "dev.zio" %% "zio-test-sbt" % "1.0.3" % Test
P
Paul Daniels 已提交
52
      ),
D
Dejan Mijić 已提交
53
      testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework"))
P
Paul Daniels 已提交
54
    )
D
Dejan Mijić 已提交
55 56 57 58 59 60 61 62 63 64

lazy val benchmarks =
  project
    .in(file("benchmarks"))
    .dependsOn(redis)
    .enablePlugins(JmhPlugin)
    .settings(
      crossScalaVersions -= Scala211,
      skip in publish := true,
      libraryDependencies ++= Seq(
65
        "dev.profunktor"    %% "redis4cats-effects" % "0.10.3",
66
        "io.chrisdavenport" %% "rediculous"         % "0.0.8",
67
        "io.laserdisc"      %% "laserdisc-fs2"      % "0.4.1"
S
ShankarShastri 已提交
68
      ),
D
Dejan Mijić 已提交
69
      scalacOptions in Compile := Seq("-Xlint:unused")
D
Dejan Mijić 已提交
70
    )
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92

lazy val example =
  project
    .in(file("example"))
    .settings(stdSettings("example"))
    .dependsOn(redis)
    .settings(
      skip in publish := true,
      libraryDependencies ++= Seq(
        "io.scalac"                    %% "zio-akka-http-interop"         % "0.4.0",
        "com.softwaremill.sttp.client" %% "core"                          % "2.2.9",
        "com.softwaremill.sttp.client" %% "async-http-client-backend-zio" % "2.2.9",
        "com.softwaremill.sttp.client" %% "circe"                         % "2.2.9",
        "io.circe"                     %% "circe-core"                    % "0.12.3",
        "io.circe"                     %% "circe-generic"                 % "0.12.3",
        "de.heikoseeberger"            %% "akka-http-circe"               % "1.31.0",
        "dev.zio"                      %% "zio-config"                    % "1.0.0-RC29-1",
        "dev.zio"                      %% "zio-config-magnolia"           % "1.0.0-RC29-1",
        "dev.zio"                      %% "zio-config-typesafe"           % "1.0.0-RC29-1"
      ),
      scalacOptions in Compile := Seq("-Xlint:unused")
    )