@@ -37,15 +37,19 @@ sonarqube {
37
37
}
38
38
}
39
39
40
+ def bomProjectName = " graphql-spring-boot-dependencies"
41
+
40
42
subprojects {
41
43
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
+ }
46
51
apply plugin : ' maven-publish'
47
52
apply plugin : " com.jfrog.bintray"
48
- apply plugin : " io.spring.dependency-management"
49
53
apply plugin : ' com.jfrog.artifactory'
50
54
51
55
group " $PROJECT_GROUP "
@@ -60,60 +64,62 @@ subprojects {
60
64
maven { url " https://oss.jfrog.org/artifactory/oss-snapshot-local" }
61
65
}
62
66
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
+ }
66
72
}
67
- }
68
73
69
- dependencies {
70
- compileOnly " org.projectlombok:lombok"
71
- annotationProcessor " org.projectlombok:lombok"
74
+ dependencies {
75
+ compileOnly " org.projectlombok:lombok"
76
+ annotationProcessor " org.projectlombok:lombok"
72
77
73
- testCompileOnly " org.projectlombok:lombok"
74
- testAnnotationProcessor " org.projectlombok:lombok"
75
- }
78
+ testCompileOnly " org.projectlombok:lombok"
79
+ testAnnotationProcessor " org.projectlombok:lombok"
80
+ }
76
81
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
+ }
89
95
}
90
- }
91
96
92
- jacoco {
93
- toolVersion = " 0.8.7-SNAPSHOT"
94
- }
97
+ jacoco {
98
+ toolVersion = " 0.8.7-SNAPSHOT"
99
+ }
95
100
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
+ }
101
107
}
102
- }
103
108
104
- idea {
105
- module {
106
- downloadJavadoc = true
107
- downloadSources = true
109
+ idea {
110
+ module {
111
+ downloadJavadoc = true
112
+ downloadSources = true
113
+ }
108
114
}
109
- }
110
115
111
- compileJava {
112
- sourceCompatibility = SOURCE_COMPATIBILITY
113
- targetCompatibility = TARGET_COMPATIBILITY
114
- }
116
+ compileJava {
117
+ sourceCompatibility = SOURCE_COMPATIBILITY
118
+ targetCompatibility = TARGET_COMPATIBILITY
119
+ }
115
120
116
- compileJava. dependsOn(processResources)
121
+ compileJava. dependsOn(processResources)
122
+ }
117
123
118
124
if (! it. name. startsWith(' example' )) {
119
125
@@ -122,19 +128,23 @@ subprojects {
122
128
enabled = false
123
129
}
124
130
125
- jar {
126
- from " LICENSE.md"
127
- }
131
+ if (it. name != bomProjectName) {
132
+ jar {
133
+ from " LICENSE.md"
134
+ }
128
135
129
- java {
130
- withSourcesJar()
131
- withJavadocJar()
136
+ java {
137
+ withSourcesJar()
138
+ withJavadocJar()
139
+ }
132
140
}
133
141
134
142
publishing {
135
143
publications {
136
144
mainProjectPublication(MavenPublication ) {
137
- from components. java
145
+ if (project. name != bomProjectName) {
146
+ from components. java
147
+ }
138
148
139
149
// to avoid "Publication only contains dependencies and/or constraints without a version" error
140
150
// see https://docs.gradle.org/6.2.1/userguide/publishing_maven.html#publishing_maven:resolved_dependencies
0 commit comments