-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
59 lines (48 loc) · 1.83 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
plugins {
java
}
val wireMockVersion = "2.26.3"
val junitJupiterVersion = "5.6.0"
val assertJVersion = "3.15.0"
val slf4jVersion = "1.7.30"
allprojects {
// Do we really need to declare this java plugin here *and* at the top of this file?
apply(plugin = "java")
apply(plugin = "application")
repositories {
jcenter()
}
dependencies {
constraints {
implementation(group = "com.github.tomakehurst", name = "wiremock-jre8", version = wireMockVersion)
implementation(group = "org.slf4j", name = "slf4j-api", version = slf4jVersion)
implementation(group = "org.slf4j", name = "slf4j-simple", version = slf4jVersion)
implementation(group = "com.github.tomakehurst", name = "wiremock-standalone", version = wireMockVersion)
testImplementation(group = "org.assertj", name = "assertj-core", version = assertJVersion)
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter-api", version = junitJupiterVersion)
testRuntimeOnly(group = "org.junit.jupiter", name = "junit-jupiter-engine", version = junitJupiterVersion)
}
}
java {
sourceCompatibility = JavaVersion.VERSION_14
targetCompatibility = JavaVersion.VERSION_14
}
tasks {
/**
* Enable Java language preview features (so we can "records")
*/
withType(JavaCompile::class.java) {
options.compilerArgs.addAll(arrayOf("--enable-preview"))
}
withType(Test::class.java) {
jvmArgs = listOf("--enable-preview")
useJUnitPlatform()
}
named<CreateStartScripts>("startScripts") {
defaultJvmOpts = listOf("--enable-preview")
}
named<JavaExec>("run") {
jvmArgs = listOf("--enable-preview")
}
}
}