Rework Antora Gradle Infrastructure
Closes gh-40572 Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import org.gradle.plugins.ide.eclipse.model.Library
|
||||
plugins {
|
||||
id "java-gradle-plugin"
|
||||
id "maven-publish"
|
||||
id "org.antora"
|
||||
id "org.springframework.boot.antora-contributor"
|
||||
id "org.springframework.boot.docker-test"
|
||||
id "org.springframework.boot.maven-repository"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
@@ -14,7 +14,6 @@ plugins {
|
||||
description = "Spring Boot Gradle Plugins"
|
||||
|
||||
configurations {
|
||||
antoraContent
|
||||
"testCompileClasspath" {
|
||||
// Downgrade SLF4J is required for tests to run in Eclipse
|
||||
resolutionStrategy.force("org.slf4j:slf4j-api:1.7.36")
|
||||
@@ -166,35 +165,25 @@ javadoc {
|
||||
}
|
||||
}
|
||||
|
||||
def antoraGradlePluginLocalAggregateContent = tasks.register("antoraGradlePluginLocalAggregateContent", Zip) {
|
||||
destinationDirectory = layout.buildDirectory.dir('generated/docs/antora-content')
|
||||
archiveClassifier = "gradle-plugin-local-aggregate-content"
|
||||
from(tasks.getByName("generateAntoraYml")) {
|
||||
into "modules"
|
||||
}
|
||||
}
|
||||
|
||||
def antoraGradlePluginCatalogContent = tasks.register("antoraGradlePluginCatalogContent", Zip) {
|
||||
destinationDirectory = layout.buildDirectory.dir('generated/docs/antora-content')
|
||||
archiveClassifier = "gradle-plugin-catalog-content"
|
||||
from(javadoc) {
|
||||
into "api/java"
|
||||
antoraContributions {
|
||||
'gradle-plugin' {
|
||||
catalogContent {
|
||||
from(javadoc) {
|
||||
into("api/java")
|
||||
}
|
||||
}
|
||||
localAggregateContent {
|
||||
from(tasks.named("generateAntoraYml")) {
|
||||
into "modules"
|
||||
}
|
||||
}
|
||||
source()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("generateAntoraPlaybook") {
|
||||
xrefStubs = ["appendix:.*", "api:.*", "reference:.*"]
|
||||
excludeJavadocExtension = true
|
||||
alwaysInclude = [name: "gradle-plugin", classifier: "local-aggregate-content"]
|
||||
dependsOn antoraGradlePluginLocalAggregateContent
|
||||
}
|
||||
|
||||
tasks.named("antora") {
|
||||
inputs.files(antoraGradlePluginLocalAggregateContent, antoraGradlePluginCatalogContent)
|
||||
}
|
||||
|
||||
artifacts {
|
||||
antoraContent antoraGradlePluginCatalogContent
|
||||
antoraExtensions.xref.stubs = ["appendix:.*", "api:.*", "reference:.*"]
|
||||
asciidocExtensions.excludeJavadocExtension = true
|
||||
}
|
||||
|
||||
toolchain {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "org.antora"
|
||||
id "org.springframework.boot.antora-contributor"
|
||||
id "org.springframework.boot.maven-plugin"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
id "org.springframework.boot.docker-test"
|
||||
@@ -9,7 +9,6 @@ description = "Spring Boot Maven Plugin"
|
||||
|
||||
configurations {
|
||||
dependenciesBom
|
||||
antoraContent
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -148,45 +147,30 @@ 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"
|
||||
antoraContributions {
|
||||
'maven-plugin' {
|
||||
aggregateContent {
|
||||
from(documentPluginGoals) {
|
||||
into "modules/maven-plugin/partials/goals"
|
||||
}
|
||||
}
|
||||
catalogContent {
|
||||
from(javadoc) {
|
||||
into "api/java"
|
||||
}
|
||||
}
|
||||
localAggregateContent {
|
||||
from(tasks.named("generateAntoraYml")) {
|
||||
into "modules"
|
||||
}
|
||||
}
|
||||
source()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("generateAntoraPlaybook") {
|
||||
xrefStubs = ["appendix:.*", "api:.*", "reference:.*", "how-to:.*"]
|
||||
excludeJavadocExtension = true
|
||||
alwaysInclude = [name: "maven-plugin", classifier: "local-aggregate-content"]
|
||||
dependsOn antoraMavenPluginLocalAggregateContent
|
||||
}
|
||||
|
||||
|
||||
tasks.named("antora") {
|
||||
inputs.files(antoraMavenPluginLocalAggregateContent, antoraMavenPluginAggregateContent, antoraMavenPluginCatalogContent)
|
||||
}
|
||||
|
||||
artifacts {
|
||||
antoraContent antoraMavenPluginAggregateContent
|
||||
antoraContent antoraMavenPluginCatalogContent
|
||||
antoraExtensions.xref.stubs = ["appendix:.*", "api:.*", "reference:.*", "how-to:.*"]
|
||||
asciidocExtensions.excludeJavadocExtension = true
|
||||
}
|
||||
|
||||
tasks.named("dockerTest").configure {
|
||||
|
||||
Reference in New Issue
Block a user