This repository has been archived by the owner on Mar 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
build.sbt
151 lines (144 loc) · 5.67 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
lazy val bintraySettings = Seq(
bintrayOrganization := Some("pagerduty"),
bintrayRepository := "oss-maven",
licenses += ("BSD New", url("https://opensource.org/licenses/BSD-3-Clause")),
publishMavenStyle := true,
pomExtra := (<url>https://github.com/PagerDuty/scheduler</url>
<scm>
<url>[email protected]:PagerDuty/scheduler.git</url>
<connection>scm:git:[email protected]:PagerDuty/scheduler.git</connection>
</scm>
<developers>
<developer>
<id>lexn82</id>
<name>Aleksey Nikiforov</name>
<url>https://github.com/lexn82</url>
</developer>
<developer>
<id>cdegroot</id>
<name>Cees de Groot</name>
<url>https://github.com/cdegroot</url>
</developer>
<developer>
<id>DWvanGeest</id>
<name>David van Geest</name>
<url>https://github.com/DWvanGeest</url>
</developer>
<developer>
<id>divtxt</id>
<name>Div Shekhar</name>
<url>https://github.com/divtxt</url>
</developer>
<developer>
<id>jppierri</id>
<name>Joseph Pierri</name>
<url>https://github.com/jppierri</url>
</developer>
</developers>)
)
// Dependencies:
// - scheduler and scala-api are both top-level dependencies which can be mixed in to other
// projects (one or both, depending on whether the project provides its own interface to
// its underlying scheduler)
// - common has code that both depend on
// - httpAdmin is an optional administrative HTTP interface
lazy val sharedSettings = Seq(
organization := "com.pagerduty",
scalaVersion := "2.11.12",
crossScalaVersions := Seq("2.10.7", "2.11.12"),
testOptions in IntegrationTest += Tests.Argument(TestFrameworks.ScalaTest, "-oD"),
publishArtifact in Test := true,
parallelExecution in IntegrationTest := false,
resolvers := Seq(
"bintray-pagerduty-oss-maven" at "https://dl.bintray.com/pagerduty/oss-maven",
Resolver.defaultLocal
)
) ++ bintraySettings
lazy val common = (project in file("common"))
.settings(sharedSettings: _*)
.settings(
name := "scheduler-common",
libraryDependencies ++= Seq(
"com.pagerduty" %% "eris-core" % "2.0.4" exclude ("org.slf4j", "slf4j-log4j12"),
"com.pagerduty" %% "metrics-api" % "1.3.0",
"org.json4s" %% "json4s-jackson" % "3.3.0",
"org.slf4j" % "slf4j-api" % "1.7.13",
"org.slf4j" % "jul-to-slf4j" % "1.7.13",
"org.apache.kafka" % "kafka-clients" % "1.0.0",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.5.0" % "test",
"ch.qos.logback" % "logback-classic" % "1.1.3" % "test"
)
)
lazy val scalaApi = (project in file("scala-api"))
.dependsOn(common)
.settings(sharedSettings: _*)
.settings(
name := "scheduler-scala-api",
libraryDependencies ++= Seq(
"com.pagerduty" %% "metrics-api" % "1.3.0",
"org.scalatest" %% "scalatest" % "2.2.6" % "test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.2.2" % "test",
"ch.qos.logback" % "logback-classic" % "1.1.3" % "test"
)
)
lazy val scheduler = (project in file("scheduler"))
.dependsOn(common % "it,test->test;compile->compile")
.dependsOn(scalaApi % "it")
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(scalafmtSettings))
.settings(sharedSettings: _*)
.settings(Defaults.itSettings: _*)
.settings(
name := "scheduler",
unmanagedSourceDirectories in IntegrationTest +=
baseDirectory.value / "src/test/scala/com/pagerduty/scheduler/specutil",
libraryDependencies ++= {
val kafkaConsumerVersion = "0.6.1"
Seq(
"com.pagerduty" %% "metrics-api" % "1.3.0",
"com.pagerduty" %% "metrics-gauge" % "1.3.0",
"com.pagerduty" %% "eris-dao" % "2.1.0",
"com.pagerduty" %% "eris-dao" % "2.1.0" % "it" classifier "tests",
"com.pagerduty" %% "kafka-consumer" % kafkaConsumerVersion,
"com.pagerduty" %% "kafka-consumer-test-support" % kafkaConsumerVersion exclude ("org.slf4j", "slf4j-simple"),
"com.typesafe.akka" %% "akka-actor" % "2.3.14",
"com.typesafe.akka" %% "akka-slf4j" % "2.3.14",
"com.typesafe.akka" %% "akka-testkit" % "2.3.14" % "it,test",
"org.scalactic" %% "scalactic" % "2.2.6" % "it,test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.2.2" % "it,test",
"org.scalatest" %% "scalatest" % "2.2.6" % "it,test",
"ch.qos.logback" % "logback-classic" % "1.1.3" % "it,test"
)
}
)
lazy val httpAdmin = (project in file("http-admin"))
.dependsOn(common % "test->test;compile->compile")
.dependsOn(scheduler % "it->it;test->test;compile->compile")
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(scalafmtSettings))
.settings(sharedSettings: _*)
.settings(Defaults.itSettings: _*)
.settings(
name := "scheduler-http-admin",
libraryDependencies ++= {
val scalatraVersion = "2.4.0"
Seq(
"org.scalatra" %% "scalatra-json" % scalatraVersion,
"org.scalatra" %% "scalatra" % scalatraVersion,
"org.scalatra" %% "scalatra-json" % scalatraVersion,
"org.eclipse.jetty" % "jetty-webapp" % "9.2.15.v20160210" % "compile",
"org.scalatra" %% "scalatra-scalatest" % scalatraVersion % "test",
"org.scalatest" %% "scalatest" % "2.2.6" % "test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.2.2" % "test",
"org.scalaj" %% "scalaj-http" % "2.3.0" % "it",
"ch.qos.logback" % "logback-classic" % "1.1.3" % "it,test"
)
}
)
lazy val root = (project in file("."))
.settings(
publish := {}
)
.aggregate(common, scalaApi, scheduler, httpAdmin)
scalafmtOnCompile in ThisBuild := true