@@ -37,15 +37,19 @@ sonarqube {
3737 }
3838}
3939
40+ def bomProjectName = " graphql-spring-boot-dependencies"
41+
4042subprojects {
4143 apply plugin : ' idea'
42- apply plugin : ' jacoco'
43- apply plugin : ' org.sonarqube'
44- apply plugin : ' java'
45- apply plugin : ' java-library'
44+ if (it. name != bomProjectName) {
45+ apply plugin : ' jacoco'
46+ apply plugin : ' org.sonarqube'
47+ apply plugin : ' java'
48+ apply plugin : ' java-library'
49+ apply plugin : " io.spring.dependency-management"
50+ }
4651 apply plugin : ' maven-publish'
4752 apply plugin : " com.jfrog.bintray"
48- apply plugin : " io.spring.dependency-management"
4953 apply plugin : ' com.jfrog.artifactory'
5054
5155 group " $PROJECT_GROUP "
@@ -59,60 +63,62 @@ subprojects {
5963 maven { url " https://oss.jfrog.org/artifactory/oss-snapshot-local" }
6064 }
6165
62- dependencyManagement {
63- imports {
64- mavenBom " org.springframework.boot:spring-boot-starter-parent:$LIB_SPRING_BOOT_VER "
66+ if (it. name != bomProjectName) {
67+ dependencyManagement {
68+ imports {
69+ mavenBom " org.springframework.boot:spring-boot-starter-parent:$LIB_SPRING_BOOT_VER "
70+ }
6571 }
66- }
6772
68- dependencies {
69- compileOnly " org.projectlombok:lombok"
70- annotationProcessor " org.projectlombok:lombok"
73+ dependencies {
74+ compileOnly " org.projectlombok:lombok"
75+ annotationProcessor " org.projectlombok:lombok"
7176
72- testCompileOnly " org.projectlombok:lombok"
73- testAnnotationProcessor " org.projectlombok:lombok"
74- }
77+ testCompileOnly " org.projectlombok:lombok"
78+ testAnnotationProcessor " org.projectlombok:lombok"
79+ }
7580
76- test {
77- useJUnitPlatform()
78- testLogging {
79- events TestLogEvent . FAILED ,
80- TestLogEvent . PASSED ,
81- TestLogEvent . SKIPPED ,
82- TestLogEvent . STANDARD_ERROR ,
83- TestLogEvent . STANDARD_OUT
84- exceptionFormat TestExceptionFormat . FULL
85- showCauses true
86- showExceptions true
87- showStackTraces true
81+ test {
82+ useJUnitPlatform()
83+ testLogging {
84+ events TestLogEvent . FAILED ,
85+ TestLogEvent . PASSED ,
86+ TestLogEvent . SKIPPED ,
87+ TestLogEvent . STANDARD_ERROR ,
88+ TestLogEvent . STANDARD_OUT
89+ exceptionFormat TestExceptionFormat . FULL
90+ showCauses true
91+ showExceptions true
92+ showStackTraces true
93+ }
8894 }
89- }
9095
91- jacoco {
92- toolVersion = " 0.8.7-SNAPSHOT"
93- }
96+ jacoco {
97+ toolVersion = " 0.8.7-SNAPSHOT"
98+ }
9499
95- jacocoTestReport {
96- reports {
97- xml. enabled = true
98- html. enabled = false
99- csv. enabled = false
100+ jacocoTestReport {
101+ reports {
102+ xml. enabled = true
103+ html. enabled = false
104+ csv. enabled = false
105+ }
100106 }
101- }
102107
103- idea {
104- module {
105- downloadJavadoc = true
106- downloadSources = true
108+ idea {
109+ module {
110+ downloadJavadoc = true
111+ downloadSources = true
112+ }
107113 }
108- }
109114
110- compileJava {
111- sourceCompatibility = SOURCE_COMPATIBILITY
112- targetCompatibility = TARGET_COMPATIBILITY
113- }
115+ compileJava {
116+ sourceCompatibility = SOURCE_COMPATIBILITY
117+ targetCompatibility = TARGET_COMPATIBILITY
118+ }
114119
115- compileJava. dependsOn(processResources)
120+ compileJava. dependsOn(processResources)
121+ }
116122
117123 if (! it. name. startsWith(' example' )) {
118124
@@ -121,19 +127,23 @@ subprojects {
121127 enabled = false
122128 }
123129
124- jar {
125- from " LICENSE.md"
126- }
130+ if (it. name != bomProjectName) {
131+ jar {
132+ from " LICENSE.md"
133+ }
127134
128- java {
129- withSourcesJar()
130- withJavadocJar()
135+ java {
136+ withSourcesJar()
137+ withJavadocJar()
138+ }
131139 }
132140
133141 publishing {
134142 publications {
135143 mainProjectPublication(MavenPublication ) {
136- from components. java
144+ if (project. name != bomProjectName) {
145+ from components. java
146+ }
137147
138148 // to avoid "Publication only contains dependencies and/or constraints without a version" error
139149 // see https://docs.gradle.org/6.2.1/userguide/publishing_maven.html#publishing_maven:resolved_dependencies
0 commit comments