From 0df946ccad445e0c354ffaa03fa220df6832c589 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 27 Jun 2024 13:06:44 +0100 Subject: [PATCH] Fix botched merge of spring-boot-maven-plugin's build.gradle --- .../spring-boot-maven-plugin/build.gradle | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle index 5b112273b38..ec73d142982 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle @@ -141,6 +141,46 @@ tasks.named("documentPluginGoals") { ] } +def antoraMavenPluginLocalAggregateContent = tasks.register("antoraMavenPluginLocalAggregateContent", Zip) { + destinationDirectory = layout.buildDirectory.dir('generated/docs/antora-content') + archiveClassifier = "maven-plugin-local-aggregate-content" + from(tasks.getByName("generateAntoraYml")) { + into "modules" + } +} + +def antoraMavenPluginAggregateContent = tasks.register("antoraMavenPluginAggregateContent", Zip) { + destinationDirectory = layout.buildDirectory.dir('generated/docs/antora-content') + archiveClassifier = "maven-plugin-aggregate-content" + from(documentPluginGoals) { + into "modules/maven-plugin/partials/goals" + } +} + +def antoraMavenPluginCatalogContent = tasks.register("antoraMavenPluginCatalogContent", Zip) { + destinationDirectory = layout.buildDirectory.dir('generated/docs/antora-content') + archiveClassifier = "maven-plugin-catalog-content" + from(javadoc) { + into "api/java" + } +} + +tasks.named("generateAntoraPlaybook") { + xrefStubs = ["appendix:.*", "api:.*", "reference:.*", "how-to:.*"] + alwaysInclude = [name: "maven-plugin", classifier: "local-aggregate-content"] + dependsOn antoraMavenPluginLocalAggregateContent +} + + +tasks.named("antora") { + inputs.files(antoraMavenPluginLocalAggregateContent, antoraMavenPluginAggregateContent, antoraMavenPluginCatalogContent) +} + +artifacts { + antoraContent antoraMavenPluginAggregateContent + antoraContent antoraMavenPluginCatalogContent +} + tasks.named("dockerTest").configure { dependsOn tasks.named("prepareMavenBinaries") }