Skip to content

Commit 4c1885d

Browse files
Replace deprecated Project.task()
Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent 93dc0fb commit 4c1885d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,16 @@ dokkatoo {
200200
moduleName.set("Spring Boot Kotlin API")
201201
}
202202

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

0 commit comments

Comments
 (0)