@@ -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 "
@@ -60,60 +64,62 @@ subprojects {
6064 maven { url " https://oss.jfrog.org/artifactory/oss-snapshot-local" }
6165 }
6266
63- dependencyManagement {
64- imports {
65- mavenBom " org.springframework.boot:spring-boot-starter-parent:$LIB_SPRING_BOOT_VER "
67+ if (it. name != bomProjectName) {
68+ dependencyManagement {
69+ imports {
70+ mavenBom " org.springframework.boot:spring-boot-starter-parent:$LIB_SPRING_BOOT_VER "
71+ }
6672 }
67- }
6873
69- dependencies {
70- compileOnly " org.projectlombok:lombok"
71- annotationProcessor " org.projectlombok:lombok"
74+ dependencies {
75+ compileOnly " org.projectlombok:lombok"
76+ annotationProcessor " org.projectlombok:lombok"
7277
73- testCompileOnly " org.projectlombok:lombok"
74- testAnnotationProcessor " org.projectlombok:lombok"
75- }
78+ testCompileOnly " org.projectlombok:lombok"
79+ testAnnotationProcessor " org.projectlombok:lombok"
80+ }
7681
77- test {
78- useJUnitPlatform()
79- testLogging {
80- events TestLogEvent . FAILED ,
81- TestLogEvent . PASSED ,
82- TestLogEvent . SKIPPED ,
83- TestLogEvent . STANDARD_ERROR ,
84- TestLogEvent . STANDARD_OUT
85- exceptionFormat TestExceptionFormat . FULL
86- showCauses true
87- showExceptions true
88- showStackTraces true
82+ test {
83+ useJUnitPlatform()
84+ testLogging {
85+ events TestLogEvent . FAILED ,
86+ TestLogEvent . PASSED ,
87+ TestLogEvent . SKIPPED ,
88+ TestLogEvent . STANDARD_ERROR ,
89+ TestLogEvent . STANDARD_OUT
90+ exceptionFormat TestExceptionFormat . FULL
91+ showCauses true
92+ showExceptions true
93+ showStackTraces true
94+ }
8995 }
90- }
9196
92- jacoco {
93- toolVersion = " 0.8.7-SNAPSHOT"
94- }
97+ jacoco {
98+ toolVersion = " 0.8.7-SNAPSHOT"
99+ }
95100
96- jacocoTestReport {
97- reports {
98- xml. enabled = true
99- html. enabled = false
100- csv. enabled = false
101+ jacocoTestReport {
102+ reports {
103+ xml. enabled = true
104+ html. enabled = false
105+ csv. enabled = false
106+ }
101107 }
102- }
103108
104- idea {
105- module {
106- downloadJavadoc = true
107- downloadSources = true
109+ idea {
110+ module {
111+ downloadJavadoc = true
112+ downloadSources = true
113+ }
108114 }
109- }
110115
111- compileJava {
112- sourceCompatibility = SOURCE_COMPATIBILITY
113- targetCompatibility = TARGET_COMPATIBILITY
114- }
116+ compileJava {
117+ sourceCompatibility = SOURCE_COMPATIBILITY
118+ targetCompatibility = TARGET_COMPATIBILITY
119+ }
115120
116- compileJava. dependsOn(processResources)
121+ compileJava. dependsOn(processResources)
122+ }
117123
118124 if (! it. name. startsWith(' example' )) {
119125
@@ -122,19 +128,23 @@ subprojects {
122128 enabled = false
123129 }
124130
125- jar {
126- from " LICENSE.md"
127- }
131+ if (it. name != bomProjectName) {
132+ jar {
133+ from " LICENSE.md"
134+ }
128135
129- java {
130- withSourcesJar()
131- withJavadocJar()
136+ java {
137+ withSourcesJar()
138+ withJavadocJar()
139+ }
132140 }
133141
134142 publishing {
135143 publications {
136144 mainProjectPublication(MavenPublication ) {
137- from components. java
145+ if (project. name != bomProjectName) {
146+ from components. java
147+ }
138148
139149 // to avoid "Publication only contains dependencies and/or constraints without a version" error
140150 // see https://docs.gradle.org/6.2.1/userguide/publishing_maven.html#publishing_maven:resolved_dependencies
0 commit comments