-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
143 lines (122 loc) · 4.84 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import com.palantir.gradle.docker.DockerComposeUp
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.springframework.boot.gradle.tasks.run.BootRun
group = "dev.wickedev.voca"
version = "0.1.0"
val kotlinCoroutineVersion = "1.6.0"
val spekVersion = "2.0.17"
val graphQLKotlinVersion = "5.3.1"
plugins {
kotlin("jvm") version "1.6.10"
id("org.jetbrains.kotlin.plugin.spring") version "1.6.10"
id("org.springframework.boot") version "2.6.1"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
id("org.jlleitschuh.gradle.ktlint") version "10.1.0"
id("com.palantir.docker-compose") version "0.28.0"
id("com.expediagroup.graphql") version "5.3.1"
}
ktlint {
version.set("0.39.0")
disabledRules.set(
setOf(
"no-wildcard-imports",
"no-consecutive-blank-lines"
)
)
filter {
exclude { element ->
element.file.path
.contains("generated")
}
exclude("*.kts")
include("**/kotlin/**")
}
}
graphql {
schema {
packages = listOf(
"org.example",
"java.time",
)
}
}
repositories {
mavenCentral()
maven("https://github.com/wickedev/graphql-jetpack/raw/deploy/maven-repo")
}
dependencies {
graphqlSDL(project(":"))
/* kotlin */
implementation(kotlin("stdlib"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${kotlinCoroutineVersion}")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:${kotlinCoroutineVersion}")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${kotlinCoroutineVersion}")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-debug")
implementation("org.jetbrains.kotlin:kotlin-reflect")
/* spring */
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.security:spring-security-crypto")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("io.projectreactor:reactor-tools")
/* graphql */
api("com.graphql-java:graphql-java:17.3")
implementation("io.github.wickedev:graphql-jetpack-starter:0.3.6")
implementation("com.expediagroup:graphql-kotlin-spring-server:$graphQLKotlinVersion")
implementation("com.expediagroup:graphql-kotlin-spring-client:$graphQLKotlinVersion")
implementation("com.expediagroup:graphql-kotlin-hooks-provider:$graphQLKotlinVersion")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("com.graphql-java:graphql-java-extended-scalars:17.0")
implementation("com.zhokhov.graphql:graphql-java-datetime:4.1.0")
runtimeOnly("com.graphql-java-kickstart:graphiql-spring-boot-starter:11.1.0")
runtimeOnly("com.graphql-java-kickstart:voyager-spring-boot-starter:11.1.0")
/* database */
implementation("io.github.wickedev:spring-data-graphql-r2dbc-starter:0.3.6")
implementation("io.r2dbc:r2dbc-postgresql")
implementation("name.nkonev.r2dbc-migrate:r2dbc-migrate-spring-boot-starter:1.8.0")
/* security */
implementation("com.auth0:java-jwt:3.18.2")
implementation("org.bouncycastle:bcpkix-jdk15on:1.69")
implementation("com.google.crypto.tink:tink:1.6.1")
/* testing */
testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spekVersion")
testImplementation("com.winterbe:expekt:0.5.0")
testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:$spekVersion")
testRuntimeOnly("org.jetbrains.kotlin:kotlin-reflect")
testImplementation("io.mockk:mockk:1.12.1")
/* testing testcontainers */
testImplementation("org.testcontainers:mariadb:1.16.2")
testImplementation("org.testcontainers:r2dbc:1.16.2")
runtimeOnly("org.mariadb.jdbc:mariadb-java-client:2.7.3")
/* testing fixture */
testImplementation("com.appmattus.fixture:fixture:1.2.0")
testImplementation("com.appmattus.fixture:fixture-generex:1.2.0")
testImplementation("com.appmattus.fixture:fixture-javafaker:1.2.0")
testImplementation("io.leangen.geantyref:geantyref:1.3.13")
testImplementation("net.jodah:typetools:0.6.3")
testImplementation("com.google.guava:guava:31.0.1-jre")
}
sourceSets {
main {
java {
srcDir("build/generated/source/proto/main/java")
}
}
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn", "-Xinline-classes")
}
}
tasks.withType<BootRun> {
dependsOn(tasks.withType<DockerComposeUp>())
systemProperty("spring.profiles.active", "dev")
systemProperty("spring.devtools.restart.enabled", "true")
systemProperty("spring.devtools.livereload.enabled", "true")
}
tasks.withType<Test> {
systemProperty("spring.profiles.active", "test")
useJUnitPlatform {
includeEngines = setOf("spek2")
}
}