Browse Source

Merge pull request #45223 from ngocnhan-tran1996

* gh-45223:
  Polish "Avoid eager creation of aggregatedJavadoc task"
  Avoid eager creation of aggregatedJavadoc task

Closes gh-45223
pull/45243/head
Andy Wilkinson 10 months ago
parent
commit
6d18ea5e11
  1. 43
      spring-boot-project/spring-boot-docs/build.gradle

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

@ -201,29 +201,32 @@ dokkatoo { @@ -201,29 +201,32 @@ dokkatoo {
moduleName.set("Spring Boot Kotlin API")
}
task aggregatedJavadoc(type: 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') }
def aggregatedJavadoc = tasks.register('aggregatedJavadoc', Javadoc) {
destinationDir = project.file(project.layout.buildDirectory.dir("docs/javadoc"))
options {
author = true
docTitle = "Spring Boot ${project.version} API"
memberLevel = "protected"
outputLevel = "quiet"
splitIndex = true
use = true
windowTitle = "Spring Boot ${project.version} API"
}
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)
destinationDir = project.file(project.layout.buildDirectory.dir("docs/javadoc"))
options {
author = true
docTitle = "Spring Boot ${project.version} API"
memberLevel = "protected"
outputLevel = "quiet"
splitIndex = true
use = true
windowTitle = "Spring Boot ${project.version} API"
}
doFirst(new ConfigureJavadocLinks(configurations.resolvedBom, ["Spring Framework", "Spring Security", "Tomcat"]))
}
}

Loading…
Cancel
Save