Remove GraphQL web starters

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
This commit is contained in:
Brian Clozel
2020-11-13 11:51:49 +01:00
parent 59d75a948e
commit 43ba3e8fcd
6 changed files with 48 additions and 61 deletions

View File

@@ -1,47 +1,11 @@
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' version '2.4.0-SNAPSHOT' apply false
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'maven'
group = 'org.springframework.experimental'
version = "0.1.0-SNAPSHOT"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
}
dependencyManagement {
imports {
mavenBom SpringBootPlugin.BOM_COORDINATES
}
dependencies {
dependency 'com.graphql-java:graphql-java:15.0'
}
generatedPomCustomization {
enabled = false
}
}
dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
apply from: "${rootDir}/gradle/publishing.gradle"
}

View File

@@ -1,12 +1,17 @@
pluginManagement {
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
}
repositories {
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == 'org.springframework.boot') {
useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}")
}
}
}
}
rootProject.name = 'spring-graphql'
include 'spring-boot-starter-graphql-web'
include 'spring-boot-starter-graphql-webflux'
include 'spring-graphql-web'

View File

@@ -1,7 +0,0 @@
description = "Starter for building GraphQL Java applications with Spring MVC"
dependencies {
api project(':spring-graphql-web')
api 'org.springframework.boot:spring-boot-starter'
api 'org.springframework.boot:spring-boot-starter-web'
}

View File

@@ -1,7 +0,0 @@
description = "Starter for building GraphQL Java applications with Spring WebFlux"
dependencies {
api project(':spring-graphql-web')
api 'org.springframework.boot:spring-boot-starter'
api 'org.springframework.boot:spring-boot-starter-webflux'
}

View File

@@ -1,2 +0,0 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.boot.graphql.WebFluxGraphQLAutoConfiguration

View File

@@ -1,7 +1,30 @@
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'
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'
@@ -20,4 +43,15 @@ dependencies {
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"