-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle.kts
83 lines (72 loc) · 2.8 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
gradle.startParameter.showStacktrace = org.gradle.api.logging.configuration.ShowStacktrace.ALWAYS
val kotlinVersion = "1.2.70"
val seleniumVersion = "3.141.59"
val log4jVersion = "2.17.2"
plugins {
kotlin("jvm").version("1.2.70")
`java-library`
id("com.atlassian.performance.tools.gradle-release").version("0.7.1")
}
configurations.all {
resolutionStrategy {
activateDependencyLocking()
failOnVersionConflict()
eachDependency {
when (requested.module.toString()) {
"commons-codec:commons-codec" -> useVersion("1.10")
"org.jetbrains:annotations" -> useVersion("16.0.3")
"org.testcontainers:testcontainers" -> useVersion("1.15.1")
"org.testcontainers:selenium" -> useVersion("1.15.1")
"net.java.dev.jna:jna" -> useVersion("5.5.0")
}
when (requested.group) {
"org.jetbrains.kotlin" -> useVersion(kotlinVersion)
"org.seleniumhq.selenium" -> useVersion(seleniumVersion)
"org.slf4j" -> useVersion("1.7.25")
"org.apache.logging.log4j" -> useVersion(log4jVersion)
}
}
}
}
dependencies {
api("com.atlassian.performance.tools:jira-actions:[3.18.0,4.0.0)")
api("com.github.stephenc.jcip:jcip-annotations:1.0-1")
api(webdriver("selenium-api"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation("org.glassfish:javax.json:1.1")
implementation(webdriver("selenium-support"))
implementation(webdriver("selenium-chrome-driver"))
implementation("org.apache.commons:commons-math3:3.6.1")
log4j(
"api",
"core",
"slf4j-impl"
).forEach { implementation(it) }
testCompile("com.atlassian.performance.tools:docker-infrastructure:0.3.6")
testCompile("junit:junit:4.12")
testCompile("org.assertj:assertj-core:3.11.1")
testCompile("org.testcontainers:testcontainers:1.15.1")
}
fun log4j(
vararg modules: String
): List<String> = modules.map { module ->
"org.apache.logging.log4j:log4j-$module:$log4jVersion"
}
fun webdriver(module: String): String = "org.seleniumhq.selenium:$module:$seleniumVersion"
tasks.getByName("wrapper", Wrapper::class).apply {
gradleVersion = "5.2.1"
distributionType = Wrapper.DistributionType.ALL
}
tasks.getByName("test", Test::class).apply {
exclude("**/*IT.class")
}
val testIntegration = task<Test>("testIntegration") {
testLogging.exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
testLogging.showStackTraces = true
testLogging.showExceptions = true
testLogging.showCauses = true
maxHeapSize = "2G"
include("**/*IT.class")
}
// Travis cannot handle this build, sadly...
tasks["check"].dependsOn(testIntegration)