Skip to content

Commit 86f09fb

Browse files
ngocnhan-tran1996wilkinsona
authored andcommitted
Avoid eager creation of aggregatedJavadoc task
See gh-45223 Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent ad61236 commit 86f09fb

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Diff for: spring-boot-project/spring-boot-docs/build.gradle

+10-9
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,16 @@ dokkatoo {
201201
moduleName.set("Spring Boot Kotlin API")
202202
}
203203

204-
task aggregatedJavadoc(type: Javadoc) {
205-
project.rootProject.gradle.projectsEvaluated {
206-
Set<Project> publishedProjects = rootProject.subprojects.findAll { it != project }
207-
.findAll { it.plugins.hasPlugin(JavaPlugin) && it.plugins.hasPlugin(MavenPublishPlugin) }
208-
.findAll { !it.path.contains(":spring-boot-tools:") ||
209-
it.path.contains(":spring-boot-tools:spring-boot-buildpack-platform") ||
210-
it.path.contains(":spring-boot-tools:spring-boot-loader-tools") ||
211-
(it.path.contains(":spring-boot-tools:spring-boot-loader") && !it.path.contains("spring-boot-loader-classic"))}
212-
.findAll { !it.name.startsWith('spring-boot-starter') }
204+
tasks.register('aggregatedJavadoc', Javadoc)
205+
project.rootProject.gradle.projectsEvaluated {
206+
Set<Project> publishedProjects = rootProject.subprojects.findAll { it != project }
207+
.findAll { it.plugins.hasPlugin(JavaPlugin) && it.plugins.hasPlugin(MavenPublishPlugin) }
208+
.findAll { !it.path.contains(":spring-boot-tools:") ||
209+
it.path.contains(":spring-boot-tools:spring-boot-buildpack-platform") ||
210+
it.path.contains(":spring-boot-tools:spring-boot-loader-tools") ||
211+
(it.path.contains(":spring-boot-tools:spring-boot-loader") && !it.path.contains("spring-boot-loader-classic"))}
212+
.findAll { !it.name.startsWith('spring-boot-starter') }
213+
tasks.named('aggregatedJavadoc', Javadoc).configure {
213214
dependsOn publishedProjects.javadoc
214215
source publishedProjects.javadoc.source
215216
classpath = project.files(publishedProjects.javadoc.classpath)

0 commit comments

Comments
 (0)