Migrate docs to antora

- This is basically copy from main branch minus all
  terminal ui things.
- Relates #971
This commit is contained in:
Janne Valkealahti
2024-01-12 14:02:10 +00:00
parent 09d4bfed51
commit 814ed4958f
108 changed files with 637 additions and 1037 deletions

View File

@@ -1,5 +1,7 @@
plugins {
id 'org.springframework.shell.docs'
id 'org.antora' version '1.0.0'
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
}
description = 'Spring Shell Documentation'
@@ -8,10 +10,41 @@ dependencies {
management platform(project(":spring-shell-management"))
implementation project(':spring-shell-starters:spring-shell-starter')
implementation project(':spring-shell-starters:spring-shell-starter-test')
implementation project(':spring-shell-samples')
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.awaitility:awaitility'
}
asciidoctorj {
version = '2.5.4'
node {
version = '16.15.0'
}
antora {
version = '3.2.0-alpha.2'
options = [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.8.1',
'@springio/asciidoctor-extensions': '1.0.0-alpha.8',
]
}
tasks.named("generateAntoraYml") {
asciidocAttributes = project.provider( {
def dependencies = resolvedVersions(project.configurations.testRuntimeClasspath)
return ['project-version' : project.version,
'spring-boot-version' : dependencies['spring-boot-starter-version'],
'spring-version': dependencies['spring-core-version']
]
} )
}
def resolvedVersions(Configuration configuration) {
return configuration.resolvedConfiguration
.resolvedArtifacts
.collectEntries { [(it.name + '-version'): it.moduleVersion.id.version] }
}