-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
build.sbt
190 lines (161 loc) · 5.98 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
import sbt._
import _root_.io.gatling.build.license.ApacheV2License
import BuildSettings._
import Dependencies._
import VersionFile._
Global / githubPath := "gatling/gatling"
Global / gatlingDevelopers := Seq(
GatlingDeveloper("[email protected]", "Stephane Landelle", isGatlingCorp = true),
GatlingDeveloper("[email protected]", "Guillaume Corré", isGatlingCorp = true),
GatlingDeveloper("[email protected]", "Thomas Petillot", isGatlingCorp = true)
)
// [e]
//
// [e]
// Root project
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
Global / scalaVersion := "2.13.15"
lazy val root = Project("gatling-parent", file("."))
.enablePlugins(GatlingOssPlugin)
.disablePlugins(SbtSpotless)
.aggregate(
nettyUtil,
commons,
docSamples,
jsonpath,
quicklens,
core,
coreJava,
jdbc,
jdbcJava,
redis,
redisJava,
httpClient,
http,
httpJava,
jms,
jmsJava,
charts,
app,
recorder,
testFramework
)
.settings(basicSettings)
.settings(skipPublishing)
// Modules
lazy val docSamples = (project in file("src/docs"))
.disablePlugins(SbtSpotless)
.enablePlugins(AutomateHeaderPlugin)
.settings(
basicSettings,
skipPublishing,
Test / unmanagedSourceDirectories ++= (baseDirectory.value ** "code").get,
libraryDependencies ++= docSamplesDependencies,
headerLicense := ApacheV2License,
// Avoid formatting but avoid errors when calling this tasks with "all"
List(Compile, Test).flatMap { conf =>
inConfig(conf) {
List(
scalafmtSbtCheck := { true },
scalafmtCheckAll := { () },
scalafmt := { () },
scalafmtSbt := { () },
scalafixAll := { () }
)
}
},
List(
scalafmtSbtCheck := { true },
scalafmtCheckAll := { () },
scalafmt := { () },
scalafmtSbt := { () },
scalafixAll := { () }
),
spotlessCheck := { () },
kotlinVersion := "2.0.21"
)
.dependsOn(
Seq(commons, jsonpath, core, coreJava, http, httpJava, jms, jmsJava, jdbc, jdbcJava, redis, redisJava).map(
_ % "compile->compile;test->test"
): _*
)
def gatlingModule(id: String) =
Project(id, file(id))
.enablePlugins(GatlingOssPlugin)
.disablePlugins(KotlinPlugin)
.settings(gatlingModuleSettings ++ CodeAnalysis.settings)
lazy val nettyUtil = gatlingModule("gatling-netty-util")
.settings(libraryDependencies ++= nettyUtilDependencies)
lazy val commons = gatlingModule("gatling-commons")
.disablePlugins(SbtSpotless)
.settings(libraryDependencies ++= commonsDependencies)
.settings(generateVersionFileSettings)
lazy val jsonpath = gatlingModule("gatling-jsonpath")
.disablePlugins(SbtSpotless)
.settings(libraryDependencies ++= jsonpathDependencies)
lazy val quicklens = gatlingModule("gatling-quicklens")
.settings(libraryDependencies ++= quicklensDependencies(scalaVersion.value))
lazy val core = gatlingModule("gatling-core")
.dependsOn(nettyUtil, quicklens)
.dependsOn(commons % "compile->compile;test->test")
.dependsOn(jsonpath % "compile->compile;test->test")
.settings(libraryDependencies ++= coreDependencies)
lazy val coreJava = gatlingModule("gatling-core-java")
.dependsOn(core % "compile->compile;test->test")
.settings(libraryDependencies ++= coreJavaDependencies)
lazy val jdbc = gatlingModule("gatling-jdbc")
.dependsOn(core % "compile->compile;test->test")
.settings(libraryDependencies ++= jdbcDependencies)
lazy val jdbcJava = gatlingModule("gatling-jdbc-java")
.dependsOn(coreJava, jdbc % "compile->compile;test->test")
.settings(libraryDependencies ++= defaultJavaDependencies)
lazy val redis = gatlingModule("gatling-redis")
.disablePlugins(SbtSpotless)
.dependsOn(core % "compile->compile;test->test")
.settings(libraryDependencies ++= redisDependencies)
lazy val redisJava = gatlingModule("gatling-redis-java")
.dependsOn(coreJava, redis % "compile->compile;test->test")
.settings(libraryDependencies ++= defaultJavaDependencies)
lazy val httpClient = gatlingModule("gatling-http-client")
.dependsOn(nettyUtil % "compile->compile;test->test")
.settings(libraryDependencies ++= httpClientDependencies)
lazy val http = gatlingModule("gatling-http")
.dependsOn(core % "compile->compile;test->test", httpClient % "compile->compile;test->test")
.settings(libraryDependencies ++= httpDependencies)
lazy val httpJava = gatlingModule("gatling-http-java")
.dependsOn(coreJava, http % "compile->compile;test->test")
.settings(libraryDependencies ++= defaultJavaDependencies)
lazy val jms = gatlingModule("gatling-jms")
.dependsOn(core % "compile->compile;test->test")
.settings(libraryDependencies ++= jmsDependencies)
.settings(Test / parallelExecution := false)
lazy val jmsJava = gatlingModule("gatling-jms-java")
.dependsOn(coreJava, jms % "compile->compile;test->test")
.settings(libraryDependencies ++= defaultJavaDependencies)
lazy val charts = gatlingModule("gatling-charts")
.disablePlugins(SbtSpotless)
.dependsOn(core % "compile->compile;test->test")
.settings(libraryDependencies ++= chartsDependencies)
.settings(chartTestsSettings)
lazy val benchmarks = gatlingModule("gatling-benchmarks")
.disablePlugins(SbtSpotless)
.dependsOn(core, http)
.enablePlugins(JmhPlugin)
.settings(libraryDependencies ++= benchmarkDependencies)
lazy val app = gatlingModule("gatling-app")
.disablePlugins(SbtSpotless)
.dependsOn(core, coreJava, http, httpJava, jms, jmsJava, jdbc, jdbcJava, redis, redisJava, charts)
lazy val recorder = gatlingModule("gatling-recorder")
.dependsOn(core % "compile->compile;test->test", http)
.settings(libraryDependencies ++= recorderDependencies)
lazy val testFramework = gatlingModule("gatling-test-framework")
.disablePlugins(SbtSpotless)
.dependsOn(app)
.settings(libraryDependencies ++= testFrameworkDependencies)
lazy val publicSamples = Project("gatling-samples", file("gatling-samples"))
.dependsOn(app)
.enablePlugins(GatlingOssPlugin)
.settings(gatlingModuleSettings)
.settings(
skipPublishing
)