Skip to content

Commit

Permalink
Modernize Antora Build
Browse files Browse the repository at this point in the history
  • Loading branch information
pderop committed Jun 24, 2024
1 parent c7391d2 commit fe29938
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 28 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ exportToHtml
.rulesets
.gradletasknamecache
*.iml
.idea
.idea
node_modules/
.full-build
7 changes: 0 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,6 @@ ext {

// Antora
antoraPluginVersion = '1.0.0'
antoraVersion = '3.2.0-alpha.4'
antoraAtlasExtensionVersion = '1.0.0-alpha.1'
antoraPdfExtensionVersion = '1.0.0-alpha.7'
antoraCollectorExtensionVersion = '1.0.0-alpha.3'
asciiDocTabVersion = '1.0.0-beta.6'
springIoAntoraExtensionsVersion = '1.8.2'
springIoAsciidoctorExtensionsVersion = '1.0.0-alpha.9'

javadocLinks = ["https://docs.oracle.com/javase/8/docs/api/",
// Use Reactive Streams 1.0.3 version for javadoc generation
Expand Down
11 changes: 3 additions & 8 deletions docs/antora-playbook.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
antora:
extensions:
- '@springio/antora-extensions/partial-build-extension'
# atlas-extension must be before latest-version-extension so latest versions are applied to imported versions
- '@antora/atlas-extension'
- require: '@springio/antora-extensions/latest-version-extension'
- require: '@springio/antora-extensions/inject-collector-cache-config-extension'
- '@antora/collector-extension'
- id: pdf-extension # pdf-extension is enabled from antora-docs.gradle
require: '@antora/pdf-extension'
enabled: false
- require: '@springio/antora-extensions/root-component-extension'
- require: '@springio/antora-extensions'
root_component_name: 'reactor-netty'
site:
title: Reactor Netty Reference Guide
url: https://projectreactor.io/docs/netty/release/reference/
url: https://projectreactor.io/docs/netty/milestone/reference/
content:
sources:
- url: ./..
Expand All @@ -24,6 +18,7 @@ asciidoc:
extensions:
- '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions'
- '@springio/asciidoctor-extensions/include-code-extension'
attributes:
page-stackoverflow-url: https://stackoverflow.com/tags/reactor-netty
page-pagination: ''
Expand Down
11 changes: 11 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"dependencies": {
"antora": "3.2.0-alpha.4",
"@antora/atlas-extension": "1.0.0-alpha.2",
"@antora/collector-extension": "1.0.0-alpha.3",
"@antora/pdf-extension": "1.0.0-alpha.7",
"@asciidoctor/tabs": "1.0.0-beta.6",
"@springio/antora-extensions": "1.11.1",
"@springio/asciidoctor-extensions": "1.0.0-alpha.10"
}
}
15 changes: 3 additions & 12 deletions gradle/antora-docs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ def isCommandAvailable(String command) {
}

antora {
version = "$antoraVersion"
playbook = findProperty('antora.playbook') ?: "antora-playbook.yml"
options = ['--clean', '--stacktrace']
options = [clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true]

def version = project.version
def forcePdf = project.hasProperty('forcePdf')
Expand All @@ -43,19 +41,12 @@ antora {
}

environment = [
'BUILD_REFNAME': 'HEAD',
'BUILD_VERSION': project.version,
'ALGOLIA_API_KEY' : 'd4bf9918bfc7d63ae68fbf92d69c2f49',
'ALGOLIA_APP_ID' : '82SNR5M8HE',
'ALGOLIA_INDEX_NAME': 'projectreactor'
]

dependencies = [
'@antora/atlas-extension' : "$antoraAtlasExtensionVersion",
'@antora/pdf-extension' : "$antoraPdfExtensionVersion",
'@antora/collector-extension' : "$antoraCollectorExtensionVersion",
'@asciidoctor/tabs' : "$asciiDocTabVersion",
'@springio/antora-extensions' : "$springIoAntoraExtensionsVersion",
'@springio/asciidoctor-extensions': "$springIoAsciidoctorExtensionsVersion"
]
}

jar {
Expand Down

0 comments on commit fe29938

Please sign in to comment.