diff --git a/settings.gradle b/settings.gradle index 877f75a7..afac47e7 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,7 +1,4 @@ rootProject.name = 'spring-graphql' -include 'spring-graphql-boot-starter-webmvc' -include 'spring-graphql-boot-starter-webflux' -include 'spring-graphql-webmvc' -include 'spring-graphql-webflux' -include 'spring-graphql-common' - +include 'spring-boot-starter-graphql-web' +include 'spring-boot-starter-graphql-webflux' +include 'spring-graphql-web' diff --git a/spring-boot-starter-graphql-web/build.gradle b/spring-boot-starter-graphql-web/build.gradle new file mode 100644 index 00000000..aba33a6c --- /dev/null +++ b/spring-boot-starter-graphql-web/build.gradle @@ -0,0 +1,7 @@ +description = "Starter for building GraphQL Java applications with Spring MVC" + +dependencies { + api project(':spring-graphql-web') + api 'io.projectreactor:reactor-core' + api 'org.springframework.boot:spring-boot-starter-web' +} diff --git a/spring-graphql-boot-starter-webmvc/src/main/java/org/springframework/graphql/servlet/GraphQLEndpointConfiguration.java b/spring-boot-starter-graphql-web/src/main/java/org/springframework/graphql/servlet/GraphQLEndpointConfiguration.java similarity index 100% rename from spring-graphql-boot-starter-webmvc/src/main/java/org/springframework/graphql/servlet/GraphQLEndpointConfiguration.java rename to spring-boot-starter-graphql-web/src/main/java/org/springframework/graphql/servlet/GraphQLEndpointConfiguration.java diff --git a/spring-graphql-boot-starter-webmvc/src/main/java/org/springframework/graphql/servlet/package-info.java b/spring-boot-starter-graphql-web/src/main/java/org/springframework/graphql/servlet/package-info.java similarity index 100% rename from spring-graphql-boot-starter-webmvc/src/main/java/org/springframework/graphql/servlet/package-info.java rename to spring-boot-starter-graphql-web/src/main/java/org/springframework/graphql/servlet/package-info.java diff --git a/spring-graphql-boot-starter-webmvc/src/main/resources/META-INF/spring.factories b/spring-boot-starter-graphql-web/src/main/resources/META-INF/spring.factories similarity index 100% rename from spring-graphql-boot-starter-webmvc/src/main/resources/META-INF/spring.factories rename to spring-boot-starter-graphql-web/src/main/resources/META-INF/spring.factories diff --git a/spring-graphql-boot-starter-webmvc/src/test/java/org/springframework/graphql/servlet/IntegrationTest.java b/spring-boot-starter-graphql-web/src/test/java/org/springframework/graphql/servlet/IntegrationTest.java similarity index 100% rename from spring-graphql-boot-starter-webmvc/src/test/java/org/springframework/graphql/servlet/IntegrationTest.java rename to spring-boot-starter-graphql-web/src/test/java/org/springframework/graphql/servlet/IntegrationTest.java diff --git a/spring-graphql-boot-starter-webmvc/src/test/java/org/springframework/graphql/servlet/IntegrationTestConfig.java b/spring-boot-starter-graphql-web/src/test/java/org/springframework/graphql/servlet/IntegrationTestConfig.java similarity index 100% rename from spring-graphql-boot-starter-webmvc/src/test/java/org/springframework/graphql/servlet/IntegrationTestConfig.java rename to spring-boot-starter-graphql-web/src/test/java/org/springframework/graphql/servlet/IntegrationTestConfig.java diff --git a/spring-boot-starter-graphql-webflux/build.gradle b/spring-boot-starter-graphql-webflux/build.gradle new file mode 100644 index 00000000..718f62dc --- /dev/null +++ b/spring-boot-starter-graphql-webflux/build.gradle @@ -0,0 +1,6 @@ +description = "Starter for building GraphQL Java applications with Spring WebFlux" + +dependencies { + api project(':spring-graphql-web') + api 'org.springframework.boot:spring-boot-starter-webflux' +} diff --git a/spring-graphql-boot-starter-webflux/src/main/java/org/springframework/graphql/reactive/GraphQLEndpointConfiguration.java b/spring-boot-starter-graphql-webflux/src/main/java/org/springframework/graphql/reactive/GraphQLEndpointConfiguration.java similarity index 100% rename from spring-graphql-boot-starter-webflux/src/main/java/org/springframework/graphql/reactive/GraphQLEndpointConfiguration.java rename to spring-boot-starter-graphql-webflux/src/main/java/org/springframework/graphql/reactive/GraphQLEndpointConfiguration.java diff --git a/spring-graphql-boot-starter-webflux/src/main/java/org/springframework/graphql/reactive/package-info.java b/spring-boot-starter-graphql-webflux/src/main/java/org/springframework/graphql/reactive/package-info.java similarity index 100% rename from spring-graphql-boot-starter-webflux/src/main/java/org/springframework/graphql/reactive/package-info.java rename to spring-boot-starter-graphql-webflux/src/main/java/org/springframework/graphql/reactive/package-info.java diff --git a/spring-graphql-boot-starter-webflux/src/main/resources/META-INF/spring.factories b/spring-boot-starter-graphql-webflux/src/main/resources/META-INF/spring.factories similarity index 100% rename from spring-graphql-boot-starter-webflux/src/main/resources/META-INF/spring.factories rename to spring-boot-starter-graphql-webflux/src/main/resources/META-INF/spring.factories diff --git a/spring-graphql-boot-starter-webflux/src/test/java/org/springframework/graphql/reactive/IntegrationTest.java b/spring-boot-starter-graphql-webflux/src/test/java/org/springframework/graphql/reactive/IntegrationTest.java similarity index 100% rename from spring-graphql-boot-starter-webflux/src/test/java/org/springframework/graphql/reactive/IntegrationTest.java rename to spring-boot-starter-graphql-webflux/src/test/java/org/springframework/graphql/reactive/IntegrationTest.java diff --git a/spring-graphql-boot-starter-webflux/src/test/java/org/springframework/graphql/reactive/IntegrationTestConfig.java b/spring-boot-starter-graphql-webflux/src/test/java/org/springframework/graphql/reactive/IntegrationTestConfig.java similarity index 100% rename from spring-graphql-boot-starter-webflux/src/test/java/org/springframework/graphql/reactive/IntegrationTestConfig.java rename to spring-boot-starter-graphql-webflux/src/test/java/org/springframework/graphql/reactive/IntegrationTestConfig.java diff --git a/spring-graphql-boot-starter-webflux/build.gradle b/spring-graphql-boot-starter-webflux/build.gradle deleted file mode 100644 index 4494fac1..00000000 --- a/spring-graphql-boot-starter-webflux/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -description = "Starter for building GraphQL Java applications with Spring WebFlux" - -dependencies { - implementation project(':spring-graphql-webflux') - implementation 'org.springframework.boot:spring-boot-autoconfigure' - - testCompile 'org.springframework.boot:spring-boot-starter-test' - testCompile 'org.springframework.boot:spring-boot-starter-webflux' -} diff --git a/spring-graphql-boot-starter-webmvc/build.gradle b/spring-graphql-boot-starter-webmvc/build.gradle deleted file mode 100644 index 02dd129c..00000000 --- a/spring-graphql-boot-starter-webmvc/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -description = "Starter for building GraphQL Java applications with Spring WebFlux" - -dependencies { - implementation project(':spring-graphql-webmvc') - implementation 'org.springframework.boot:spring-boot-autoconfigure' - - testCompile 'org.springframework.boot:spring-boot-starter-test' - testCompile 'org.springframework.boot:spring-boot-starter-web' -} diff --git a/spring-graphql-common/build.gradle b/spring-graphql-common/build.gradle deleted file mode 100644 index 3cf49eaf..00000000 --- a/spring-graphql-common/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -description = "Common module for GraphQL Java Spring support" - -dependencies { - api 'io.projectreactor:reactor-core' - api "com.graphql-java:graphql-java" - implementation "org.springframework:spring-web" -} diff --git a/spring-graphql-web/build.gradle b/spring-graphql-web/build.gradle new file mode 100644 index 00000000..a7da2ac3 --- /dev/null +++ b/spring-graphql-web/build.gradle @@ -0,0 +1,16 @@ +description = "GraphQL Java support with Spring Web frameworks" + +dependencies { + api "com.graphql-java:graphql-java" + + compileOnly "org.springframework:spring-context" + compileOnly "org.springframework:spring-webflux" + + compileOnly 'org.springframework:spring-webmvc' + compileOnly 'javax.servlet:javax.servlet-api' + + testImplementation "com.fasterxml.jackson.core:jackson-databind" + testImplementation "org.springframework:spring-webflux" + testImplementation 'org.springframework:spring-webmvc' + testImplementation 'javax.servlet:javax.servlet-api' +} \ No newline at end of file diff --git a/spring-graphql-common/src/main/java/org/springframework/graphql/DefaultGraphQLInterceptor.java b/spring-graphql-web/src/main/java/org/springframework/graphql/DefaultGraphQLInterceptor.java similarity index 100% rename from spring-graphql-common/src/main/java/org/springframework/graphql/DefaultGraphQLInterceptor.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/DefaultGraphQLInterceptor.java diff --git a/spring-graphql-common/src/main/java/org/springframework/graphql/GraphQLHandler.java b/spring-graphql-web/src/main/java/org/springframework/graphql/GraphQLHandler.java similarity index 100% rename from spring-graphql-common/src/main/java/org/springframework/graphql/GraphQLHandler.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/GraphQLHandler.java diff --git a/spring-graphql-common/src/main/java/org/springframework/graphql/GraphQLHttpRequest.java b/spring-graphql-web/src/main/java/org/springframework/graphql/GraphQLHttpRequest.java similarity index 100% rename from spring-graphql-common/src/main/java/org/springframework/graphql/GraphQLHttpRequest.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/GraphQLHttpRequest.java diff --git a/spring-graphql-common/src/main/java/org/springframework/graphql/GraphQLHttpResponse.java b/spring-graphql-web/src/main/java/org/springframework/graphql/GraphQLHttpResponse.java similarity index 100% rename from spring-graphql-common/src/main/java/org/springframework/graphql/GraphQLHttpResponse.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/GraphQLHttpResponse.java diff --git a/spring-graphql-common/src/main/java/org/springframework/graphql/GraphQLInterceptor.java b/spring-graphql-web/src/main/java/org/springframework/graphql/GraphQLInterceptor.java similarity index 100% rename from spring-graphql-common/src/main/java/org/springframework/graphql/GraphQLInterceptor.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/GraphQLInterceptor.java diff --git a/spring-graphql-common/src/main/java/org/springframework/graphql/package-info.java b/spring-graphql-web/src/main/java/org/springframework/graphql/package-info.java similarity index 100% rename from spring-graphql-common/src/main/java/org/springframework/graphql/package-info.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/package-info.java diff --git a/spring-graphql-webflux/src/main/java/org/springframework/graphql/reactive/components/GraphQLController.java b/spring-graphql-web/src/main/java/org/springframework/graphql/reactive/components/GraphQLController.java similarity index 100% rename from spring-graphql-webflux/src/main/java/org/springframework/graphql/reactive/components/GraphQLController.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/reactive/components/GraphQLController.java diff --git a/spring-graphql-webflux/src/main/java/org/springframework/graphql/reactive/components/GraphQLReactiveRequestBody.java b/spring-graphql-web/src/main/java/org/springframework/graphql/reactive/components/GraphQLReactiveRequestBody.java similarity index 100% rename from spring-graphql-webflux/src/main/java/org/springframework/graphql/reactive/components/GraphQLReactiveRequestBody.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/reactive/components/GraphQLReactiveRequestBody.java diff --git a/spring-graphql-webflux/src/main/java/org/springframework/graphql/reactive/components/package-info.java b/spring-graphql-web/src/main/java/org/springframework/graphql/reactive/components/package-info.java similarity index 100% rename from spring-graphql-webflux/src/main/java/org/springframework/graphql/reactive/components/package-info.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/reactive/components/package-info.java diff --git a/spring-graphql-webmvc/src/main/java/org/springframework/graphql/servlet/components/GraphQLController.java b/spring-graphql-web/src/main/java/org/springframework/graphql/servlet/components/GraphQLController.java similarity index 100% rename from spring-graphql-webmvc/src/main/java/org/springframework/graphql/servlet/components/GraphQLController.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/servlet/components/GraphQLController.java diff --git a/spring-graphql-webmvc/src/main/java/org/springframework/graphql/servlet/components/GraphQLServletRequestBody.java b/spring-graphql-web/src/main/java/org/springframework/graphql/servlet/components/GraphQLServletRequestBody.java similarity index 100% rename from spring-graphql-webmvc/src/main/java/org/springframework/graphql/servlet/components/GraphQLServletRequestBody.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/servlet/components/GraphQLServletRequestBody.java diff --git a/spring-graphql-webmvc/src/main/java/org/springframework/graphql/servlet/components/package-info.java b/spring-graphql-web/src/main/java/org/springframework/graphql/servlet/components/package-info.java similarity index 100% rename from spring-graphql-webmvc/src/main/java/org/springframework/graphql/servlet/components/package-info.java rename to spring-graphql-web/src/main/java/org/springframework/graphql/servlet/components/package-info.java diff --git a/spring-graphql-webflux/build.gradle b/spring-graphql-webflux/build.gradle deleted file mode 100644 index 17d7668d..00000000 --- a/spring-graphql-webflux/build.gradle +++ /dev/null @@ -1,10 +0,0 @@ -description = "GraphQL Java Spring WebFlux integration" - -dependencies { - api 'com.graphql-java:graphql-java' - - implementation project(':spring-graphql-common') - implementation 'org.springframework:spring-context' - implementation 'org.springframework:spring-webflux' - implementation 'com.fasterxml.jackson.core:jackson-databind' -} diff --git a/spring-graphql-webmvc/build.gradle b/spring-graphql-webmvc/build.gradle deleted file mode 100644 index 1873a823..00000000 --- a/spring-graphql-webmvc/build.gradle +++ /dev/null @@ -1,10 +0,0 @@ -description = "GraphQL Java Spring MVC integration" - -dependencies { - api 'com.graphql-java:graphql-java' - - implementation project(':spring-graphql-common') - implementation 'org.springframework:spring-webmvc' - implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'javax.servlet:javax.servlet-api' -}