forked from atlassian/jira-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
102 lines (89 loc) · 3.26 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinVersion = "1.2.70"
val seleniumVersion = "3.141.59"
plugins {
kotlin("jvm").version("1.2.70")
`java-library`
id("com.atlassian.performance.tools.gradle-release").version("0.7.1")
id("com.gradle.build-scan").version("2.4.2")
}
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishAlways()
}
configurations.all {
resolutionStrategy {
activateDependencyLocking()
failOnVersionConflict()
eachDependency {
when (requested.module.toString()) {
"commons-codec:commons-codec" -> useVersion("1.10")
"org.jetbrains:annotations" -> useVersion("13.0")
"org.slf4j:slf4j-api" -> useVersion("1.7.25")
"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)
}
}
}
}
dependencies {
api("com.github.stephenc.jcip:jcip-annotations:1.0-1")
api(webdriver("selenium-api"))
api("com.atlassian.performance:selenium-js:[1.0.0,2.0.0)")
implementation(webdriver("selenium-support"))
implementation(webdriver("selenium-chrome-driver"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
implementation("org.glassfish:javax.json:1.1")
implementation("org.apache.commons:commons-math3:3.6.1")
implementation("com.atlassian.performance.tools:concurrency:[1.0.0,2.0.0)")
listOf(
"api",
"core",
"slf4j-impl",
"jul"
).map { module ->
"org.apache.logging.log4j:log4j-$module:2.10.0"
}.forEach { implementation(it) }
testCompile("org.assertj:assertj-core:3.11.0")
testCompile("com.atlassian.performance.tools:io:[1.0.0,2.0.0)")
testCompile("com.atlassian.performance.tools:docker-infrastructure:0.3.3")
testCompile("junit:junit:4.12")
testCompile("org.testcontainers:testcontainers:1.15.1")
}
tasks.test {
testLogging.showStandardStreams = true
}
tasks
.withType(KotlinCompile::class.java)
.forEach { compileTask ->
compileTask.apply {
kotlinOptions.apply {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjvm-default=enable")
}
}
}
fun webdriver(module: String): String = "org.seleniumhq.selenium:$module:$seleniumVersion"
tasks.wrapper {
gradleVersion = "5.1.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
testLogging.showStandardStreams = true //this is really only needed for Travis
maxHeapSize = "2G"
include("**/*IT.class")
}
tasks["check"].dependsOn(testIntegration)