-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbusyevents.sbt
120 lines (105 loc) · 3.68 KB
/
busyevents.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
import sbt._
import Settings._
lazy val root = project.root
.setName("busyevents")
.setDescription("BusyEvents build script")
.configureRoot
.aggregate(core, laws, jsonCirce, apacheKafka, awsCommon, awsKinesis, awsSQS, tests)
lazy val core = project.from("core")
.setName("busyevents-core")
.setDescription("Simple event bus interface")
.setInitialImport()
.configureModule
.settings(Compile / resourceGenerators += task[Seq[File]] {
val file = (Compile / resourceManaged).value / "busyevents-version.conf"
IO.write(file, s"version=${version.value}")
Seq(file)
})
lazy val migration = project.from("migration")
.setName("busyevents-migration")
.setDescription("Utility for migration from old bus to new bus")
.setInitialImport()
.configureModule
.dependsOn(core)
lazy val laws = project.from("laws")
.setName("busyevents-laws")
.setDescription("Contracts that all combination of codec-bus-dql should hold")
.setInitialImport()
.configureModule
.settings(
libraryDependencies += Dependencies.spec2Core,
libraryDependencies += Dependencies.spec2Scalacheck
)
.dependsOn(core, migration)
// encoders integrations
lazy val jsonCirce = project.integration("json-circe")
.setName("busyevents-circe")
.setDescription("Turn Circe codecs into busyevents codecs")
.setInitialImport("io.scalaland.busyevents.circe._")
.configureModule
.configureTests()
.settings(
libraryDependencies += Dependencies.circe,
libraryDependencies += Dependencies.circeParser,
libraryDependencies += Dependencies.circeGeneric % Test
)
.dependsOn(core, laws % "test->compile")
// Apache integrations
lazy val apacheKafka = project.integration("apache-kafka")
.setName("busyevents-kafka")
.setDescription("Use Apache Kafka as event bus")
.setInitialImport("io.scalaland.busyevents.apache.kafka._")
.configureModule
.configureTests()
.settings(
libraryDependencies += Dependencies.alpakkaKafka
)
.dependsOn(core, laws % "test->compile")
// AWS integrations
lazy val awsCommon = project.integration("aws-common")
.setName("busyevents-aws-common")
.setDescription("Common AWs configs of all AWS integrations")
.setInitialImport("io.scalaland.busyevents.aws._")
.configureModule
.configureTests()
.settings(
libraryDependencies += Dependencies.awsSDKCore,
libraryDependencies += Dependencies.awsNioClient
)
.dependsOn(core, laws % "test->compile")
lazy val awsKinesis = project.integration("aws-kinesis")
.setName("busyevents-kinesis")
.setDescription("Use AWS Kinesis as event bus")
.setInitialImport("io.scalaland.busyevents.aws.kinesis._")
.configureModule
.configureTests()
.settings(
libraryDependencies += Dependencies.kinesisClient,
libraryDependencies += Dependencies.kinesisStreams
)
.compileAndTestDependsOn(awsCommon)
lazy val awsSQS = project.integration("aws-sqs")
.setName("busyevents-sqs")
.setDescription("Use AWS SQS as dead letter queue")
.setInitialImport("io.scalaland.busyevents.aws.sqs._")
.configureModule
.configureTests()
.settings(
libraryDependencies += Dependencies.alpakkaSQS
)
.compileAndTestDependsOn(awsCommon)
// tests
lazy val tests = project.from("tests")
.setName("tests")
.setDescription("Tests of modules")
.setInitialImport()
.configureModule
.configureTests(requiresFork = true)
.settings(
libraryDependencies += Dependencies.logback
)
.dependsOn(core, laws % "test->compile")
.compileAndTestDependsOn(jsonCirce, apacheKafka, awsKinesis, awsSQS)
addCommandAlias("fullTest", ";test;scalastyle")
addCommandAlias("fullCoverageTest", ";coverage;test;coverageReport;coverageAggregate;scalastyle")
addCommandAlias("relock", ";unlock;reload;update;lock")