Browse Source

Polish "Avoid eager creation of aggregatedJavadoc task"

See gh-45223
pull/45243/head
Andy Wilkinson 8 months ago
parent
commit
21a9f4bbc5
  1. 28
      spring-boot-project/spring-boot-docs/build.gradle

28
spring-boot-project/spring-boot-docs/build.gradle

@ -201,19 +201,7 @@ dokkatoo { @@ -201,19 +201,7 @@ dokkatoo {
moduleName.set("Spring Boot Kotlin API")
}
tasks.register('aggregatedJavadoc', Javadoc)
project.rootProject.gradle.projectsEvaluated {
Set<Project> publishedProjects = rootProject.subprojects.findAll { it != project }
.findAll { it.plugins.hasPlugin(JavaPlugin) && it.plugins.hasPlugin(MavenPublishPlugin) }
.findAll { !it.path.contains(":spring-boot-tools:") ||
it.path.contains(":spring-boot-tools:spring-boot-buildpack-platform") ||
it.path.contains(":spring-boot-tools:spring-boot-loader-tools") ||
(it.path.contains(":spring-boot-tools:spring-boot-loader") && !it.path.contains("spring-boot-loader-classic"))}
.findAll { !it.name.startsWith('spring-boot-starter') }
tasks.named('aggregatedJavadoc', Javadoc).configure {
dependsOn publishedProjects.javadoc
source publishedProjects.javadoc.source
classpath = project.files(publishedProjects.javadoc.classpath)
def aggregatedJavadoc = tasks.register('aggregatedJavadoc', Javadoc) {
destinationDir = project.file(project.layout.buildDirectory.dir("docs/javadoc"))
options {
author = true
@ -226,6 +214,20 @@ project.rootProject.gradle.projectsEvaluated { @@ -226,6 +214,20 @@ project.rootProject.gradle.projectsEvaluated {
}
doFirst(new ConfigureJavadocLinks(configurations.resolvedBom, ["Spring Framework", "Spring Security", "Tomcat"]))
}
project.rootProject.gradle.projectsEvaluated {
Set<Project> publishedProjects = rootProject.subprojects.findAll { it != project }
.findAll { it.plugins.hasPlugin(JavaPlugin) && it.plugins.hasPlugin(MavenPublishPlugin) }
.findAll { !it.path.contains(":spring-boot-tools:") ||
it.path.contains(":spring-boot-tools:spring-boot-buildpack-platform") ||
it.path.contains(":spring-boot-tools:spring-boot-loader-tools") ||
(it.path.contains(":spring-boot-tools:spring-boot-loader") && !it.path.contains("spring-boot-loader-classic"))}
.findAll { !it.name.startsWith('spring-boot-starter') }
aggregatedJavadoc.configure {
dependsOn publishedProjects.javadoc
source publishedProjects.javadoc.source
classpath = project.files(publishedProjects.javadoc.classpath)
}
}
tasks.register("documentTestSlices", org.springframework.boot.build.test.autoconfigure.DocumentTestSlices) {

Loading…
Cancel
Save