diff --git a/build.gradle b/build.gradle index 3f31cb9a..137e8b1c 100644 --- a/build.gradle +++ b/build.gradle @@ -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" } diff --git a/settings.gradle b/settings.gradle index 68c91de5..f561df35 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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' diff --git a/spring-boot-starter-graphql-web/build.gradle b/spring-boot-starter-graphql-web/build.gradle deleted file mode 100644 index 42d60e90..00000000 --- a/spring-boot-starter-graphql-web/build.gradle +++ /dev/null @@ -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' -} diff --git a/spring-boot-starter-graphql-webflux/build.gradle b/spring-boot-starter-graphql-webflux/build.gradle deleted file mode 100644 index 36fd382f..00000000 --- a/spring-boot-starter-graphql-webflux/build.gradle +++ /dev/null @@ -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' -} diff --git a/spring-boot-starter-graphql-webflux/src/main/resources/META-INF/spring.factories b/spring-boot-starter-graphql-webflux/src/main/resources/META-INF/spring.factories deleted file mode 100644 index cf4e1043..00000000 --- a/spring-boot-starter-graphql-webflux/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -org.springframework.boot.graphql.WebFluxGraphQLAutoConfiguration diff --git a/spring-graphql-web/build.gradle b/spring-graphql-web/build.gradle index 7ccf50a1..b77c3b42 100644 --- a/spring-graphql-web/build.gradle +++ b/spring-graphql-web/build.gradle @@ -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' -} \ No newline at end of file + 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" \ No newline at end of file