Refactor project build
This commit refactors the project build to better share dependency management definitions between modules. This also upgrades the project to Spring Boot 2.5.0. Closes gh-45
This commit is contained in:
54
build.gradle
54
build.gradle
@@ -1,10 +1,58 @@
|
||||
plugins {
|
||||
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
|
||||
}
|
||||
|
||||
ext {
|
||||
moduleProjects = subprojects.findAll { it.name.startsWith("spring-") }
|
||||
}
|
||||
|
||||
subprojects {
|
||||
group = 'org.springframework.experimental'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
group = 'org.springframework.graphql'
|
||||
version = "1.0.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
maven { url 'https://repo.spring.io/snapshot' }
|
||||
if (version.contains('-')) {
|
||||
maven { url "https://repo.spring.io/milestone" }
|
||||
}
|
||||
if (version.endsWith('-SNAPSHOT')) {
|
||||
maven { url "https://repo.spring.io/snapshot" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure(moduleProjects) {
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'org.springframework.graphql.conventions'
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "com.fasterxml.jackson:jackson-bom:2.12.3"
|
||||
mavenBom "io.projectreactor:reactor-bom:2020.0.7"
|
||||
mavenBom "org.springframework:spring-framework-bom:5.3.7"
|
||||
mavenBom "org.junit:junit-bom:5.7.2"
|
||||
}
|
||||
dependencies {
|
||||
dependency 'com.graphql-java:graphql-java:16.2'
|
||||
dependency 'org.assertj:assertj-core:3.19.0'
|
||||
dependencySet(group: 'org.apache.logging.log4j', version: '2.14.1') {
|
||||
entry 'log4j-api'
|
||||
entry 'log4j-core'
|
||||
entry 'log4j-jul'
|
||||
entry 'log4j-slf4j-impl'
|
||||
}
|
||||
}
|
||||
generatedPomCustomization {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/publishing.gradle"
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import org.springframework.boot.gradle.plugin.SpringBootPlugin
|
||||
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.4.5' apply false
|
||||
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
|
||||
id 'org.springframework.boot' version '2.5.0' apply false
|
||||
id 'java-library'
|
||||
id "org.springframework.graphql.conventions"
|
||||
id 'org.springframework.graphql.conventions'
|
||||
}
|
||||
|
||||
group = 'org.springframework.experimental'
|
||||
description = "GraphQL Spring Boot Starter"
|
||||
|
||||
java {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.4.5'
|
||||
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
|
||||
id 'org.springframework.boot' version '2.5.0'
|
||||
id 'java'
|
||||
}
|
||||
group = 'com.example'
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.4.5'
|
||||
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
|
||||
id 'org.springframework.boot' version '2.5.0'
|
||||
id 'java'
|
||||
}
|
||||
group = 'com.example'
|
||||
|
||||
@@ -1,31 +1,8 @@
|
||||
|
||||
plugins {
|
||||
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
|
||||
id 'java-library'
|
||||
id "org.springframework.graphql.conventions"
|
||||
}
|
||||
|
||||
description = "Spring Support for Testing GraphQL Applications"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "com.fasterxml.jackson:jackson-bom:2.12.3"
|
||||
mavenBom "io.projectreactor:reactor-bom:2020.0.6"
|
||||
mavenBom "org.springframework:spring-framework-bom:5.3.6"
|
||||
}
|
||||
generatedPomCustomization {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':spring-graphql')
|
||||
api 'com.graphql-java:graphql-java:16.2'
|
||||
api 'com.graphql-java:graphql-java'
|
||||
api 'io.projectreactor:reactor-core'
|
||||
api 'org.springframework:spring-context'
|
||||
api 'org.springframework:spring-test'
|
||||
@@ -38,8 +15,8 @@ dependencies {
|
||||
compileOnly 'javax.servlet:javax.servlet-api:4.0.1'
|
||||
compileOnly 'org.skyscreamer:jsonassert:1.5.0'
|
||||
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
|
||||
testImplementation 'org.assertj:assertj-core:3.19.0'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter'
|
||||
testImplementation 'org.assertj:assertj-core'
|
||||
testImplementation 'org.mockito:mockito-core:3.8.0'
|
||||
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
|
||||
testImplementation 'org.springframework:spring-webflux'
|
||||
@@ -49,8 +26,8 @@ dependencies {
|
||||
testImplementation 'com.squareup.okhttp3:mockwebserver:3.14.9'
|
||||
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
|
||||
|
||||
testRuntimeOnly 'org.apache.logging.log4j:log4j-core:2.14.1'
|
||||
testRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1'
|
||||
testRuntimeOnly 'org.apache.logging.log4j:log4j-core'
|
||||
testRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'
|
||||
}
|
||||
|
||||
test {
|
||||
@@ -59,5 +36,3 @@ test {
|
||||
events "passed", "skipped", "failed"
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/publishing.gradle"
|
||||
|
||||
@@ -1,30 +1,7 @@
|
||||
|
||||
plugins {
|
||||
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
|
||||
id 'java-library'
|
||||
id "org.springframework.graphql.conventions"
|
||||
}
|
||||
|
||||
description = "GraphQL Support for Spring Applications"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "com.fasterxml.jackson:jackson-bom:2.12.3"
|
||||
mavenBom "io.projectreactor:reactor-bom:2020.0.6"
|
||||
mavenBom "org.springframework:spring-framework-bom:5.3.6"
|
||||
}
|
||||
generatedPomCustomization {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api 'com.graphql-java:graphql-java:16.2'
|
||||
api 'com.graphql-java:graphql-java'
|
||||
api 'io.projectreactor:reactor-core'
|
||||
api 'org.springframework:spring-context'
|
||||
|
||||
@@ -34,8 +11,8 @@ dependencies {
|
||||
compileOnly 'org.springframework:spring-websocket'
|
||||
compileOnly 'javax.servlet:javax.servlet-api:4.0.1'
|
||||
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
|
||||
testImplementation 'org.assertj:assertj-core:3.19.0'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter'
|
||||
testImplementation 'org.assertj:assertj-core'
|
||||
testImplementation 'io.projectreactor:reactor-test'
|
||||
testImplementation 'org.springframework:spring-webflux'
|
||||
testImplementation 'org.springframework:spring-webmvc'
|
||||
@@ -44,8 +21,8 @@ dependencies {
|
||||
testImplementation 'javax.servlet:javax.servlet-api:4.0.1'
|
||||
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
|
||||
|
||||
testRuntimeOnly 'org.apache.logging.log4j:log4j-core:2.14.1'
|
||||
testRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1'
|
||||
testRuntimeOnly 'org.apache.logging.log4j:log4j-core'
|
||||
testRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'
|
||||
}
|
||||
|
||||
test {
|
||||
@@ -54,5 +31,3 @@ test {
|
||||
events "passed", "skipped", "failed"
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/publishing.gradle"
|
||||
|
||||
Reference in New Issue
Block a user