-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
126 lines (114 loc) · 3.48 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
@file:Suppress("LocalVariableName")
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
`java-library`
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin")
id("org.jetbrains.dokka")
id("com.github.ben-manes.versions")
id("com.adarshr.test-logger")
jacoco
}
group = "io.github.christian-draeger"
val release_version: String by project
version = release_version
repositories {
mavenCentral()
}
dependencies {
val testContainersVersion = "1.16.0"
implementation("org.testcontainers:testcontainers:$testContainersVersion")
implementation("org.testcontainers:influxdb:$testContainersVersion")
implementation("ch.qos.logback:logback-classic:1.2.5")
implementation("org.seleniumhq.selenium:selenium-java:3.141.59")
implementation("io.github.bonigarcia:webdrivermanager:5.0.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.0")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
vendor.set(JvmVendorSpec.ADOPTOPENJDK)
}
withJavadocJar()
withSourcesJar()
}
testlogger {
setTheme("mocha-parallel")
slowThreshold = 1000
}
jacoco {
toolVersion = "0.8.6"
}
nexusPublishing {
repositories {
sonatype()
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = rootProject.name
from(components["java"])
pom {
name.set("k6-kotlin")
description.set("Run k6 load and performance testing scenarios from your JVM project on an out-of-the box but configurable k6 infra spin-up by the use of Docker.")
url.set("https://github.com/christian-draeger/${rootProject.name}")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("christian-draeger")
name.set("Christian Dräger")
}
}
scm {
connection.set("scm:git:git://github.com/christian-draeger/${rootProject.name}.git")
developerConnection.set("scm:git:ssh://github.com:christian-draeger/${rootProject.name}.git")
url.set("https://github.com/christian-draeger/${rootProject.name}/tree/main")
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
val signingKeyId: String? by project
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}
}
tasks {
withType<KotlinCompile> {
kotlinOptions.apply {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjsr305=strict")
apiVersion = "1.5"
languageVersion = "1.5"
}
}
withType<JavaCompile> {
options.encoding = "UTF-8"
}
withType<JacocoReport> {
reports {
xml.isEnabled = true
}
}
withType<Test> {
useJUnitPlatform()
testLogging {
events(
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.FAILED
)
}
}
}