* Use `providers.provider` for `modifiedFiles`.
This defers the looking up of `modifiedFiles` until it is used. It
also allows other tasks to be ran from the non-primary work tree.
Working in another work tree is essential for Antora which will clone
each branch/tag into a new work tree to process it.
* Migrate Structure
* Insert explicit ids for headers
* Fix image::image
* Copy default antora files
* Fix indentation for all pages
* Split files
* Generate a default navigation
* Remove includes
* Fix cross references
* Enable Section Summary TOC for small pages
* Polish nav.adoc
* Fix duplicate ids
* Escape {firstname} and {lastname}
* Remove links to htmlsingle and pdf Formats
* Fix broken links
* Disable attributes for ${debezium-version}
* Migrate to Asciidoctor Tabs
* Move to src/reference/antora
* Remove Asciidoctor Build
* deploy-docs only spring-projects
62 lines
1.9 KiB
Groovy
62 lines
1.9 KiB
Groovy
ext {
|
|
micrometerDocsVersion='1.0.1'
|
|
}
|
|
|
|
|
|
antora {
|
|
version = '3.2.0-alpha.2'
|
|
playbook = file('src/reference/antora/antora-playbook.yml')
|
|
options = ['to-dir' : project.layout.buildDirectory.dir('site').get().toString(), clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true]
|
|
dependencies = [
|
|
'@antora/atlas-extension': '1.0.0-alpha.1',
|
|
'@antora/collector-extension': '1.0.0-alpha.3',
|
|
'@asciidoctor/tabs': '1.0.0-beta.3',
|
|
'@springio/antora-extensions': '1.4.2',
|
|
'@springio/asciidoctor-extensions': '1.0.0-alpha.8',
|
|
]
|
|
}
|
|
|
|
tasks.named("generateAntoraYml") {
|
|
asciidocAttributes = project.provider( {
|
|
return ['project-version' : project.version ]
|
|
} )
|
|
baseAntoraYmlFile = file('src/reference/antora/antora.yml')
|
|
}
|
|
|
|
tasks.create(name: 'createAntoraPartials', type: Sync) {
|
|
from { tasks.filterMetricsDocsContent.outputs }
|
|
into layout.buildDirectory.dir('generated-antora-resources/modules/ROOT/partials')
|
|
}
|
|
|
|
tasks.create('generateAntoraResources') {
|
|
dependsOn 'createAntoraPartials'
|
|
dependsOn 'generateAntoraYml'
|
|
}
|
|
|
|
configurations {
|
|
micrometerDocs
|
|
}
|
|
|
|
dependencies {
|
|
micrometerDocs "io.micrometer:micrometer-docs-generator:$micrometerDocsVersion"
|
|
}
|
|
|
|
def observationInputDir = file('spring-integration-core/src/main/java/org/springframework/integration/support/management/observation').absolutePath
|
|
def generatedDocsDir = file("$buildDir/reference/generated").absolutePath
|
|
|
|
task generateObservabilityDocs(type: JavaExec) {
|
|
inputs.dir(observationInputDir)
|
|
outputs.dir(generatedDocsDir)
|
|
classpath configurations.micrometerDocs
|
|
args observationInputDir, /.+/, generatedDocsDir
|
|
mainClass = 'io.micrometer.docs.DocsGeneratorCommand'
|
|
}
|
|
|
|
task filterMetricsDocsContent(type: Copy) {
|
|
dependsOn generateObservabilityDocs
|
|
from generatedDocsDir
|
|
include '_*.adoc'
|
|
into generatedDocsDir
|
|
rename { filename -> filename.replace '_', '' }
|
|
filter { line -> line.replaceAll('org.springframework.integration', 'o.s.i') }
|
|
} |