-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle.kts
94 lines (81 loc) · 3.11 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
val kotlinVersion = "1.2.70"
val log4jVersion = "2.17.2"
plugins {
kotlin("jvm").version("1.2.70")
id("com.atlassian.performance.tools.gradle-release").version("0.7.1")
`java-library`
id("com.gradle.build-scan").version("2.4.2")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
}
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
}
configurations.all {
resolutionStrategy {
activateDependencyLocking()
failOnVersionConflict()
eachDependency {
when (requested.module.toString()) {
"com.google.guava:guava" -> useVersion("23.6-jre")
"org.apache.commons:commons-csv" -> useVersion("1.4")
"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.jcraft:jzlib" -> useVersion("1.1.3")
"com.google.code.gson:gson" -> useVersion("2.8.2")
"org.jsoup:jsoup" -> useVersion("1.10.2")
"com.numericalmethod:suanshu-20120606" -> useVersion("1.0.1-atlassian-hosted")
}
when (requested.group) {
"org.jetbrains.kotlin" -> useVersion(kotlinVersion)
"org.apache.logging.log4j" -> useVersion(log4jVersion)
}
}
}
}
dependencies {
api("com.atlassian.performance.tools:jira-actions:[3.27.0, 4.0.0)") // 3.27 brought RecordedPerformanceEntries.timeOrigin
api("com.atlassian.performance.tools:infrastructure:[2.0.0,5.0.0)")
api("com.atlassian.performance.tools:workspace:[2.0.0,3.0.0)")
api("com.atlassian.performance.tools:virtual-users:[1.0.0,4.0.0)")
listOf(
"com.atlassian.performance.tools:io:[1.0.0,2.0.0)",
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion",
"org.eclipse.jgit:org.eclipse.jgit:4.11.0.201803080745-r",
"org.apache.commons:commons-csv:1.4",
"org.apache.commons:commons-math3:3.6.1",
"org.apache.commons:commons-lang3:3.5",
"com.numericalmethod:suanshu-20120606:1.0.1-atlassian-hosted"
).plus(
log4jCore()
).forEach { implementation(it) }
listOf(
"junit:junit:4.12",
"org.hamcrest:hamcrest-library:1.3",
"org.assertj:assertj-core:3.10.0",
"com.atlassian.performance.tools:jira-software-actions:[1.1.0, 4.0.0)"
).forEach { testCompile(it) }
}
fun log4jCore(): List<String> = log4j(
"api",
"core",
"slf4j-impl"
)
fun log4j(
vararg modules: String
): List<String> = modules.map { module ->
"org.apache.logging.log4j:log4j-$module:$log4jVersion"
}
tasks.getByName("test", Test::class).apply {
maxHeapSize = "2g" // Work around https://ecosystem.atlassian.net/browse/JPERF-395
}
tasks.getByName("wrapper", Wrapper::class).apply {
gradleVersion = "5.0"
distributionType = Wrapper.DistributionType.ALL
}