2021-08-07 09:21:08 +07:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
|
|
plugins {
|
2021-08-07 19:56:39 +07:00
|
|
|
id("org.springframework.boot") version "2.5.3"
|
2021-08-07 09:21:08 +07:00
|
|
|
id("io.spring.dependency-management") version "1.0.11.RELEASE"
|
|
|
|
kotlin("jvm") version "1.5.21"
|
|
|
|
kotlin("plugin.spring") version "1.5.21"
|
|
|
|
kotlin("plugin.jpa") version "1.5.21"
|
2021-08-07 19:56:39 +07:00
|
|
|
id("com.netflix.dgs.codegen") version "5.0.5"
|
2021-08-07 09:21:08 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "com.cubetiqs"
|
|
|
|
version = "0.0.1-SNAPSHOT"
|
|
|
|
java.sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven { url = uri("https://m.ctdn.net") }
|
|
|
|
}
|
|
|
|
|
2021-08-07 19:56:39 +07:00
|
|
|
extra["dgsVersion"] = "4.5.0"
|
2021-08-07 09:21:08 +07:00
|
|
|
|
|
|
|
dependencies {
|
2021-08-07 19:56:39 +07:00
|
|
|
implementation("com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter:${property("dgsVersion")}")
|
2021-08-07 10:27:34 +07:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
2021-08-07 09:21:08 +07:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
2021-08-07 19:56:39 +07:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
2021-08-07 09:21:08 +07:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-webflux")
|
|
|
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
|
|
|
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
|
|
|
|
|
|
|
|
developmentOnly("org.springframework.boot:spring-boot-devtools")
|
|
|
|
runtimeOnly("org.postgresql:postgresql")
|
|
|
|
|
|
|
|
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
|
|
|
testImplementation("io.projectreactor:reactor-test")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
|
|
kotlinOptions {
|
|
|
|
freeCompilerArgs = listOf("-Xjsr305=strict")
|
|
|
|
jvmTarget = "11"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<Test> {
|
|
|
|
useJUnitPlatform()
|
2021-08-07 19:56:39 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<com.netflix.graphql.dgs.codegen.gradle.GenerateJavaTask> {
|
|
|
|
packageName = "com.cubetiqs.graphql.demo.dgmodel"
|
|
|
|
schemaPaths = mutableListOf("${projectDir}/src/main/resources/schema")
|
|
|
|
generateClient = true
|
2021-08-07 10:27:34 +07:00
|
|
|
}
|