-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sbt
93 lines (82 loc) · 3.2 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
import Settings._
import sbt._
ThisBuild / scalafixDependencies ++= Dependencies.scalafixDeps
val generateManifest = taskKey[Seq[File]]("generateManifest")
Compile / generateManifest := {
val content = IO.read((Compile / baseDirectory).value / "release/manifest.json")
val out = (Compile / baseDirectory).value / "connector/target/manifest.json"
IO.write(out, content.replace("<project.version>", artifactVersion))
Seq(out)
}
Compile / resourceGenerators += (Compile / generateManifest)
lazy val root = Project("kafka-ems-connector", file("."))
.settings(rootSettings)
.settings(
name := "kafka-ems-connector",
excludeDependencies += ExclusionRule("javax.ws.rs", "javax.ws.rs-api"),
)
.aggregate(
connector,
`test-common`,
)
.dependsOn(`test-common` % "e2e->compile")
.dependsOn(connector)
.configureE2ETests(requiresParallelExecution = false)
.disablePlugins(sbtassembly.AssemblyPlugin)
lazy val `test-common` = project.in(file("test-common"))
.disablePlugins(sbtassembly.AssemblyPlugin)
.settings(
modulesSettings ++
Seq(
name := "test-common",
description := "Provides common utilities for testing",
libraryDependencies ++= testCommonDeps,
excludeDependencies += ExclusionRule("javax.ws.rs", "javax.ws.rs-api"),
libraryDependencies += "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6",
publish / skip := true,
),
)
lazy val connector = project.in(file("connector"))
.enablePlugins(BuildInfoPlugin)
.settings(
modulesSettings ++
Seq(
name := "kafka-ems-sink",
description := "Provides a Kafka Connect sink for Celonis EMS",
libraryDependencies ++= emsSinkDeps,
dependencyOverrides ++= emsSinkOverrides,
excludeDependencies += ExclusionRule("javax.ws.rs", "javax.ws.rs-api"),
libraryDependencies += "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6",
publish / skip := true,
buildInfoKeys := Seq[BuildInfoKey](
name,
version,
BuildInfoKey(git.gitHeadCommit),
),
buildInfoPackage := "com.celonis.kafka.connect",
),
)
.dependsOn(`test-common` % "test->compile;it->compile")
.configureTests()
.configureIntegrationTests()
.configureAssembly()
addCommandAlias(
"validateAll",
";headerCheck;test:headerCheck;scalafmtCheckAll;scalafmtSbtCheck",
)
addCommandAlias(
"formatAll",
";headerCreate;test:headerCreate;scalafmtAll;scalafmtSbt",
)
addCommandAlias("fullTest", ";test;it:test;fun:test;e2e:test")
addCommandAlias("fullCoverageTest", ";coverage;test;it:test;coverageReport;coverageAggregate")
addCommandAlias(
"assemblyWithoutTest",
";kafka-ems-connector / clean; kafka-ems-connector / generateManifest; set connector / assembly / test := {}; connector / assembly",
)
addCommandAlias("assemblyAndE2eTest", ";assemblyWithoutTest;kafka-ems-connector / E2e / test")
dependencyCheckFormats := Seq("XML", "HTML")
dependencyCheckNodeAnalyzerEnabled := Some(false)
dependencyCheckNodeAuditAnalyzerEnabled := Some(false)
dependencyCheckNPMCPEAnalyzerEnabled := Some(false)
dependencyCheckRetireJSAnalyzerEnabled := Some(false)