The GraphQL Spring Boot starters aren't actually necessary. The typical GraphQL usage is really tied to the type of web application you're building: Spring MVC or WebFlux. Adding the `spring-graphql-web` dependency to the classpath is a signal strong enough that we can configure additional endpoints into the web application. Closes gh-17
57 lines
1.7 KiB
Groovy
57 lines
1.7 KiB
Groovy
import org.springframework.boot.gradle.plugin.SpringBootPlugin
|
|
|
|
plugins {
|
|
id 'org.springframework.boot' version '2.4.0-SNAPSHOT' apply false
|
|
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
|
|
id 'java-library'
|
|
id 'maven'
|
|
}
|
|
|
|
description = "GraphQL Java support with Spring Web frameworks"
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
dependencyManagement {
|
|
imports {
|
|
mavenBom SpringBootPlugin.BOM_COORDINATES
|
|
}
|
|
generatedPomCustomization {
|
|
enabled = false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api 'com.graphql-java:graphql-java:15.0'
|
|
// Reactor is required as it's part of the interception model
|
|
api 'io.projectreactor:reactor-core'
|
|
// auto-configurations should be moved to the spring-boot project
|
|
api 'org.springframework.boot:spring-boot-autoconfigure'
|
|
|
|
compileOnly 'org.springframework:spring-context'
|
|
compileOnly 'org.springframework:spring-webflux'
|
|
|
|
compileOnly 'org.springframework:spring-webmvc'
|
|
compileOnly 'javax.servlet:javax.servlet-api'
|
|
|
|
compileOnly 'io.micrometer:micrometer-core'
|
|
compileOnly 'org.springframework.boot:spring-boot-actuator-autoconfigure'
|
|
|
|
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
|
|
annotationProcessor 'org.springframework.boot:spring-boot-autoconfigure-processor'
|
|
|
|
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
|
|
testImplementation 'org.springframework:spring-webflux'
|
|
testImplementation 'org.springframework:spring-webmvc'
|
|
testImplementation 'javax.servlet:javax.servlet-api'
|
|
testImplementation 'org.springframework.boot:spring-boot-actuator-autoconfigure'
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events "passed", "skipped", "failed"
|
|
}
|
|
}
|
|
|
|
apply from: "${rootDir}/gradle/publishing.gradle" |