forked from austek/pact-avro-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
70 lines (65 loc) · 2.43 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
import BuildSettings.*
import Dependencies.*
import PublishSettings.*
import TestEnvironment.*
ThisBuild / scalaVersion := scala213
lazy val plugin = project
.in(file("modules/plugin"))
.enablePlugins(
GitHubPagesPlugin,
GitVersioning,
JavaAppPackaging
)
.settings(
name := "plugin",
maintainer := "[email protected]",
basicSettings,
publishSettings,
testEnvSettings,
gitHubPagesOrgName := "austek",
gitHubPagesRepoName := "pact-avro-plugin",
gitHubPagesSiteDir := (`pact-avro-plugin` / baseDirectory).value / "build" / "site",
gitHubPagesAcceptedTextExtensions := Set(".css", ".html", ".js", ".svg", ".txt", ".woff", ".woff2", ".xml"),
Compile / PB.targets := Seq(
scalapb.gen() -> (Compile / sourceManaged).value / "scalapb"
),
libraryDependencies ++=
Dependencies.compile(apacheAvro, auPactMatchers, logback, pactCore, scalaLogging, scalaPBRuntime) ++
Dependencies.protobuf(scalaPB) ++
Dependencies.test(scalaTest),
dependencyOverrides ++= Seq(grpcApi, grpcCore, grpcNetty)
)
lazy val pluginRef = LocalProject("plugin")
lazy val provider = project
.in(file("modules/examples/provider"))
.settings(
basicSettings,
Test / sbt.Keys.test := (Test / sbt.Keys.test).dependsOn(pluginRef / buildTestPluginDir).value,
Test / envVars := Map("PACT_PLUGIN_DIR" -> ((pluginRef / target).value / "plugin").absolutePath),
libraryDependencies ++=
Dependencies.compile(avroCompiler, logback, pulsar4sCore, pulsar4sAvro, pureConfig, scalacheck) ++
Dependencies.test(assertJCore, jUnitInterface, pactProviderJunit, pactCore),
publish / skip := false
)
lazy val consumer = project
.in(file("modules/examples/consumer"))
.settings(
basicSettings,
Compile / avroSource := (Compile / resourceDirectory).value / "avro",
Test / sbt.Keys.test := (Test / sbt.Keys.test).dependsOn(pluginRef / buildTestPluginDir).value,
Test / envVars := Map("PACT_PLUGIN_DIR" -> ((pluginRef / target).value / "plugin").absolutePath),
libraryDependencies ++=
Dependencies.compile(avroCompiler, logback, pulsar4sCore, pulsar4sAvro, pureConfig, scalaLogging) ++
Dependencies.test(assertJCore, jUnitInterface, pactConsumerJunit, pactCore),
publish / skip := false
)
lazy val `pact-avro-plugin` = (project in file("."))
.aggregate(
pluginRef,
consumer,
provider
)
.settings(
basicSettings,
publish / skip := false
)