-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathbuild.gradle.kts
98 lines (81 loc) · 3.3 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
import com.netflix.graphql.dgs.codegen.gradle.GenerateJavaTask
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
plugins {
id("org.springframework.boot") version "3.4.4"
id("io.spring.dependency-management") version "1.1.7"
kotlin("jvm") version "2.1.20"
kotlin("plugin.spring") version "2.1.20"
id("com.netflix.dgs.codegen") version "8.0.2" //https://plugins.gradle.org/plugin/com.netflix.dgs.codegen
}
// extra["graphql-java.version"] = "19.2"
group = "com.example"
version = "0.0.1-SNAPSHOT"
kotlin {
jvmToolchain(21)
compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_2_0)
languageVersion.set(KotlinVersion.KOTLIN_2_0)
freeCompilerArgs.addAll(
"-Xjsr305=strict",
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
)
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url = uri("https://repo.spring.io/milestone") }
maven { url = uri("https://repo.spring.io/snapshot") }
}
dependencyManagement {
imports {
mavenBom("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:10.1.2")
}
}
dependencies {
// dgs
//implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:8.1.1"))
implementation("com.netflix.graphql.dgs:dgs-starter")
implementation("com.netflix.graphql.dgs:graphql-dgs-extended-scalars")
//jdbc
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
implementation("org.postgresql:postgresql")
// spring boot
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-websocket")
implementation("name.nkonev.multipart-spring-graphql:multipart-spring-graphql:1.5.3")
// spring security
implementation("org.springframework.boot:spring-boot-starter-security")
// spring data mongo
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
// data redis
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.session:spring-session-data-redis")
//kotlin
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib")
//test
testImplementation("org.springframework:spring-websocket")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("io.projectreactor:reactor-test")
testImplementation("com.netflix.graphql.dgs:dgs-starter-test")
}
tasks.withType<GenerateJavaTask> {
schemaPaths =
mutableListOf("${projectDir}/src/main/resources/schema") // List of directories containing schema files
packageName = "com.example.demo.gql" // The package name to use to generate sources
generateClient = true // Enable generating the type safe query API
shortProjectionNames = false
maxProjectionDepth = 2
snakeCaseConstantNames = true
typeMapping = mutableMapOf(
"UUID" to "java.util.UUID",
"Upload" to "org.springframework.web.multipart.MultipartFile"
)
}
tasks.withType<Test> {
useJUnitPlatform()
}