-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle.kts
129 lines (115 loc) · 4.36 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
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.net.URI
val log4jVersion = "2.17.2"
buildscript {
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.70")
}
}
plugins {
kotlin("jvm").version("1.2.70")
}
repositories {
mavenLocal()
mavenCentral()
maven(URI("https://packages.atlassian.com/maven-external/"))
}
tasks.getByName("test", Test::class).apply {
filter {
exclude("**/*IT.class")
}
}
tasks.withType(KotlinCompile::class).forEach {
it.kotlinOptions {
jvmTarget = "1.8"
}
}
task<Test>("recommendHardware").apply {
outputs.upToDateWhen { false }
description = "Recommends hardware setups for Jira based on performance tests"
include("**/HardwareRecommendationIT.class")
val shadowJarTask = tasks.getByPath(":virtual-users:shadowJar")
dependsOn(shadowJarTask)
systemProperty("jpt.virtual-users.shadow-jar", shadowJarTask.outputs.files.files.first())
System.getProperty("hwr.jsw.version")?.let { systemProperty("hwr.jsw.version", it) }
failFast = true
maxHeapSize = "8g"
testLogging {
showStandardStreams = true
}
}
task<Test>("testIntegration").apply {
outputs.upToDateWhen { false }
description = "Runs IT tests against the framework"
include("**/HardwareRecommendationEngineIT.class")
val shadowJarTask = tasks.getByPath(":virtual-users:shadowJar")
dependsOn(shadowJarTask)
systemProperty("jpt.virtual-users.shadow-jar", shadowJarTask.outputs.files.files.first())
failFast = true
maxHeapSize = "700m"
testLogging {
showStandardStreams = true
}
}
task<Test>("cleanUpAfterBamboo").apply {
outputs.upToDateWhen { false }
include("**/BambooCleanupIT.class")
}
dependencies {
testCompile(project(":virtual-users"))
testCompile("com.atlassian.performance.tools:jira-performance-tests:[4.0.0,5.0.0)")
testCompile("com.atlassian.performance.tools:infrastructure:[4.14.0,5.0.0)")
testCompile("com.atlassian.performance.tools:virtual-users:[3.6.2,3.12.0)")
testCompile("com.atlassian.performance.tools:jira-software-actions:[1.1.0,2.0.0]")
testCompile("com.atlassian.performance.tools:aws-infrastructure:[3.0.0,4.0.0)")
testCompile("com.atlassian.performance.tools:aws-resources:[1.3.4,2.0.0)")
testCompile("com.atlassian.performance.tools:concurrency:[1.0.0,2.0.0)")
testCompile("org.apache.commons:commons-csv:1.4")
testCompile("org.eclipse.jgit:org.eclipse.jgit:4.11.0.201803080745-r")
testCompile("junit:junit:4.12")
testCompile("org.hamcrest:hamcrest-library:1.3")
testCompile("org.assertj:assertj-core:3.11.1")
testCompile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.70")
listOf(
"api",
"core",
"slf4j-impl"
).map {
"org.apache.logging.log4j:log4j-$it:$log4jVersion"
}.forEach {
testCompile(it)
}
}
configurations.all {
resolutionStrategy {
failOnVersionConflict()
activateDependencyLocking()
resolutionStrategy {
eachDependency {
when (requested.module.toString()) {
"org.apache.commons:commons-csv" -> useVersion("1.4")
"com.google.guava:guava" -> useVersion("23.6-jre")
"org.apache.httpcomponents:httpclient" -> useVersion("4.5.5")
"org.slf4j:slf4j-api" -> useVersion("1.8.0-alpha2")
"org.apache.httpcomponents:httpcore" -> useVersion("4.4.9")
"commons-logging:commons-logging" -> useVersion("1.2")
"org.codehaus.plexus:plexus-utils" -> useVersion("3.1.0")
"com.fasterxml.jackson.core:jackson-core" -> useVersion("2.9.4")
"com.google.code.gson:gson" -> useVersion("2.8.2")
"org.jsoup:jsoup" -> useVersion("1.10.2")
"com.jcraft:jzlib" -> useVersion("1.1.3")
"com.amazonaws:aws-java-sdk-ec2" -> useVersion("1.11.817")
"commons-codec:commons-codec" -> useVersion("1.11")
}
when (requested.group) {
"org.jetbrains.kotlin" -> useVersion("1.2.70")
"org.apache.logging.log4j" -> useVersion(log4jVersion)
}
}
}
}
}
tasks.wrapper {
version = "5.1.1"
distributionType = Wrapper.DistributionType.BIN
}