Skip to content

Commit 35d62b2

Browse files
committed
Update to Match Spring Security Docs Configuration
This commit specifically removes configuration that customizes the playbook file name, moves dependency management to npm, updates antora packages to match Spring Security versions, and adds the syncAntoraResources task. Issue gh-1297
1 parent a6c19f4 commit 35d62b2

File tree

4 files changed

+31
-15
lines changed

4 files changed

+31
-15
lines changed

cached-antora-playbook.yml renamed to antora-playbook.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33
# The purpose of this Antora playbook is to build the docs in the current branch.
44
antora:
55
extensions:
6-
- '@antora/collector-extension'
7-
- id: '@antora/atlas-extension'
8-
require: '@antora/atlas-extension'
9-
enabled: false
10-
- '@springio/antora-extensions/latest-version-extension'
11-
- require: '@springio/antora-extensions/root-component-extension'
12-
root_component_name: 'ldap'
6+
- require: '@springio/antora-extensions'
7+
root_component_name: 'ldap'
138
site:
149
title: Spring LDAP Reference
10+
url: https://docs.spring.io/spring-ldap/reference
11+
robots: allow
1512
content:
1613
sources:
1714
- url: .
@@ -27,6 +24,7 @@ asciidoc:
2724
- '@asciidoctor/tabs'
2825
- '@springio/asciidoctor-extensions'
2926
- '@springio/asciidoctor-extensions/include-code-extension'
27+
- '@springio/asciidoctor-extensions/javadoc-extension'
3028
sourcemap: true
3129
urls:
3230
latest_version_segment: ''

antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ nav:
66
ext:
77
collector:
88
run:
9-
command: gradlew -q -PbuildSrc.skipTests=true "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" generateAntoraYml
9+
command: gradlew -q -PbuildSrc.skipTests=true "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" generateAntoraResources
1010
local: true
1111
scan:
1212
dir: ./build/generated-antora-resources

build.gradle

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,18 @@ nohttp {
3939

4040

4141
antora {
42-
playbook = 'cached-antora-playbook.yml'
43-
playbookProvider {
44-
repository = 'spring-projects/spring-ldap'
45-
branch = 'docs-build'
46-
path = 'lib/antora/templates/per-branch-antora-playbook.yml'
47-
checkLocalBranch = true
48-
}
4942
options = [clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true]
43+
environment = [
44+
'BUILD_REFNAME': 'HEAD',
45+
'BUILD_VERSION': project.version,
46+
]
47+
}
48+
49+
tasks.register("syncAntoraAttachments", Sync) {
50+
group = 'Documentation'
51+
description = 'Syncs the Antora attachments'
52+
from project.provider( { project.tasks.api.outputs } )
53+
into project.layout.buildDirectory.dir('generated-antora-resources/modules/ROOT/assets/attachments/api/java')
5054
}
5155

5256
tasks.named("generateAntoraYml") {
@@ -58,6 +62,10 @@ tasks.named("generateAntoraYml") {
5862
} )
5963
}
6064

65+
tasks.register("generateAntoraResources") {
66+
dependsOn 'generateAntoraYml', 'syncAntoraAttachments'
67+
}
68+
6169
springRelease {
6270
repositoryOwner = "spring-projects"
6371
repositoryName = "spring-ldap"

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"dependencies": {
3+
"antora": "3.2.0-alpha.10",
4+
"@antora/atlas-extension": "1.0.0-alpha.5",
5+
"@antora/collector-extension": "1.0.2",
6+
"@asciidoctor/tabs": "1.0.0-beta.6",
7+
"@springio/antora-extensions": "1.14.7",
8+
"@springio/asciidoctor-extensions": "1.0.0-alpha.17"
9+
}
10+
}

0 commit comments

Comments
 (0)