-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
114 lines (100 loc) · 4.03 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import sbtrelease.ReleaseStateTransformations._
import sbtrelease.ReleasePlugin.autoImport._
val circeVersion = "0.14.3"
// -------------------------------------------------------------------------------------------------------------------
// Root Project
// -------------------------------------------------------------------------------------------------------------------
lazy val root = (project in file("."))
.settings(
inThisBuild(
List(
organization := "com.techmonal",
scalaVersion := "2.13.10",
scalastyleFailOnError := true,
scalastyleFailOnWarning := false,
scalafmtOnCompile := true
)
),
name := "fp-cassandra"
)
.aggregate(common, db, web)
.dependsOn(common, db, web)
// -------------------------------------------------------------------------------------------------------------------
// Common Module
// -------------------------------------------------------------------------------------------------------------------
lazy val common = project
.in(file("modules/common"))
.settings(name := "common")
.settings(addCompilerPlugin(kindProjectorSetting))
.settings(libraryDependencies ++= commonLibraryDependencies)
// -------------------------------------------------------------------------------------------------------------------
// Web Module
// -------------------------------------------------------------------------------------------------------------------
lazy val web = project
.in(file("modules/web"))
.settings(name := "web")
.aggregate(common)
.dependsOn(common)
.settings(addCompilerPlugin(kindProjectorSetting))
.settings(libraryDependencies ++= webLibraryDependencies)
// -------------------------------------------------------------------------------------------------------------------
// DB Module
// -------------------------------------------------------------------------------------------------------------------
lazy val db = project
.in(file("modules/db"))
.settings(name := "db")
.aggregate(common)
.dependsOn(common)
.settings(addCompilerPlugin(kindProjectorSetting))
.settings(libraryDependencies ++= dbLibraryDependencies)
lazy val commonLibraryDependencies = Seq(
"com.twitter" %% "util-core" % "22.7.0",
"ch.qos.logback" % "logback-classic" % "1.2.11",
"org.scalatest" %% "scalatest" % "3.0.8" % Test,
"org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % Test
) ++ circeDependencies
lazy val webLibraryDependencies = Seq()
lazy val dbLibraryDependencies = commonLibraryDependencies ++ Seq(
"com.datastax.dse" % "dse-java-driver-core" % "1.5.1",
"org.typelevel" %% "cats-core" % "2.9.0",
"org.cassandraunit" % "cassandra-unit" % "3.5.0.1"
)
lazy val circeDependencies = Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion)
scalacOptions ++= Seq(
"-feature",
"-unchecked",
"-language:higherKinds",
"-language:postfixOps",
"-deprecation",
"-Ypartial-unification",
"-encoding"
)
resolvers ++= Seq(
Resolver.mavenLocal,
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots"),
"Bintray ".at("https://dl.bintray.com/projectseptemberinc/maven")
)
releaseProcess := Seq(
checkSnapshotDependencies,
inquireVersions,
// publishing locally in the process
releaseStepCommandAndRemaining("+publishLocal"),
releaseStepCommandAndRemaining("+clean"),
releaseStepCommandAndRemaining("+test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion,
pushChanges
)
lazy val kindProjectorSetting = "org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full
addCommandAlias("fmt", ";scalafmtSbt;scalafmt;test:scalafmt")
addCommandAlias("cpl", ";compile;test:compile")
addCommandAlias("validate", ";clean;scalafmtSbtCheck;scalafmtCheck;test:scalafmtCheck;coverage;test;coverageOff;coverageReport;coverageAggregate")
addCommandAlias("testAll", ";clean;test;it:test")