-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
80 lines (63 loc) · 2.65 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
val kotlinVersion = "1.3.11"
kotlin("plugin.jpa") version kotlinVersion
id("org.springframework.boot") version "2.1.6.RELEASE"
id("io.spring.dependency-management") version "1.0.7.RELEASE"
kotlin("jvm") version kotlinVersion
kotlin("plugin.spring") version kotlinVersion
}
group = "de.akquinet.demo"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
jcenter()
}
val graphqlKickstartVersion = "5.10.0"
dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
runtimeOnly("mysql:mysql-connector-java")
implementation("org.mariadb.jdbc:mariadb-java-client:2.4.2")
compile("com.graphql-java-kickstart:graphql-spring-boot-starter:$graphqlKickstartVersion")
runtime("com.graphql-java-kickstart:altair-spring-boot-starter:$graphqlKickstartVersion")
testCompile("com.graphql-java-kickstart:graphql-spring-boot-starter-test:$graphqlKickstartVersion") {
exclude(module = "mockito-core")
}
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0")
testCompile("com.h2database:h2:1.4.199")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
sourceSets {
create("test-integration") {
compileClasspath += sourceSets.main.get().output
runtimeClasspath += sourceSets.main.get().output
}
}
val testIntegrationImplementation by configurations.getting {
extendsFrom(configurations.implementation.get())
}
configurations["test-integrationRuntimeOnly"].extendsFrom(configurations.runtimeOnly.get())
dependencies {
val testcontainersVersion = "1.9.1"
testIntegrationImplementation("com.graphql-java-kickstart:graphql-spring-boot-starter-test:$graphqlKickstartVersion")
testIntegrationImplementation("org.testcontainers:testcontainers:$testcontainersVersion")
testIntegrationImplementation("org.testcontainers:mariadb:$testcontainersVersion")
}
val integrationTest = task<Test>("integrationTest") {
description = "Runs integration tests."
group = "verification"
testClassesDirs = sourceSets["test-integration"].output.classesDirs
classpath = sourceSets["test-integration"].runtimeClasspath
shouldRunAfter("test")
}
tasks.check { dependsOn(integrationTest) }