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