forked from atlassian/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
92 lines (80 loc) · 3.07 KB
/
build.gradle.kts
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
val kotlinVersion = "1.2.70"
plugins {
kotlin("jvm").version("1.2.70")
`java-library`
id("com.atlassian.performance.tools.gradle-release").version("0.5.0")
}
configurations.all {
resolutionStrategy {
activateDependencyLocking()
failOnVersionConflict()
eachDependency {
when (requested.module.toString()) {
"com.google.guava:guava" -> useVersion("23.6-jre")
"org.apache.httpcomponents:httpclient" -> useVersion("4.5.5")
"org.apache.httpcomponents:httpcore" -> useVersion("4.4.9")
"org.codehaus.plexus:plexus-utils" -> useVersion("3.1.0")
"org.slf4j:slf4j-api" -> useVersion("1.8.0-alpha2")
"com.google.code.gson:gson" -> useVersion("2.8.2")
"org.jsoup:jsoup" -> useVersion("1.10.2")
"org.jetbrains:annotations" -> useVersion("15.0")
"com.google.code.findbugs:jsr305" -> useVersion("3.0.2")
"org.apache.commons:commons-compress" -> useVersion("1.9")
}
when (requested.group) {
"org.jetbrains.kotlin" -> useVersion(kotlinVersion)
}
}
}
}
dependencies {
api("com.atlassian.performance.tools:ssh:[2.0.0,3.0.0)")
api("com.atlassian.performance.tools:jira-actions:[2.0.0,4.0.0)")
api("com.atlassian.performance.tools:virtual-users:[3.4.0,4.0.0)")
implementation("com.atlassian.performance.tools:io:[1.0.0,2.0.0)")
implementation("com.atlassian.performance.tools:concurrency:[1.0.0,2.0.0)")
implementation("com.atlassian.performance.tools:jvm-tasks:[1.0.0,2.0.0)")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlinVersion")
implementation("com.google.guava:guava:23.6-jre")
implementation("org.apache.httpcomponents:httpclient:4.5.5")
implementation("org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:3.1.3")
log4j(
"api",
"core",
"slf4j-impl"
).forEach { implementation(it) }
webdriver().forEach { testCompile(it) }
testCompile("junit:junit:4.12")
testCompile("com.atlassian.performance.tools:jira-software-actions:[1.0.0,2.0.0)")
testCompile("org.hamcrest:hamcrest-library:1.3")
testCompile("org.assertj:assertj-core:3.11.1")
testCompile("com.atlassian.performance.tools:ssh-ubuntu:0.1.0")
testCompile("org.rnorth.duct-tape:duct-tape:1.0.7")
}
fun webdriver(): List<String> = listOf(
"selenium-support",
"selenium-chrome-driver"
).map { module ->
"org.seleniumhq.selenium:$module:3.11.0"
}
fun log4j(
vararg modules: String
): List<String> = modules.map { module ->
"org.apache.logging.log4j:log4j-$module:2.10.0"
}
tasks.getByName("test", Test::class).apply {
filter {
exclude("**/*IT.class")
}
}
val testIntegration = task<Test>("testIntegration") {
filter {
include("**/*IT.class")
}
maxParallelForks = 4
}
tasks["check"].dependsOn(testIntegration)
tasks.getByName("wrapper", Wrapper::class).apply {
gradleVersion = "5.2.1"
distributionType = Wrapper.DistributionType.ALL
}