Skip to content

Commit 9996777

Browse files
author
Jay Bryant
authored
Use spring-asciidoctor-backends
Rather than `spring-doc-resources`, which is to be retired. * Fix some problems with tabs in docs
1 parent 690743e commit 9996777

File tree

3 files changed

+17
-24
lines changed

3 files changed

+17
-24
lines changed

gradle/docs.gradle

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
11
ext {
2-
docResourcesVersion = '0.2.5'
3-
blockSwitchVersion = '0.5.0'
2+
backendVersion = '0.0.3'
43
}
54

65
configurations {
7-
docs
8-
asciidoctorExt
6+
asciidoctorExtensions
97
}
108

119
dependencies {
12-
docs "io.spring.docresources:spring-doc-resources:${docResourcesVersion}@zip"
13-
asciidoctorExt "io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch:$blockSwitchVersion"
14-
}
15-
16-
task prepareAsciidocBuild(type: Sync) {
17-
dependsOn configurations.docs
18-
from {
19-
configurations.docs.collect { zipTree(it) }
20-
}
21-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
22-
from 'src/reference/asciidoc/'
23-
into "$buildDir/asciidoc"
10+
asciidoctorExtensions "io.spring.asciidoctor.backends:spring-asciidoctor-backends:$backendVersion"
2411
}
2512

2613
task checkAsciidocLinks {
27-
dependsOn prepareAsciidocBuild
28-
inputs.dir("$buildDir/asciidoc")
14+
inputs.dir("src/reference/asciidoc/")
2915
doLast {
3016
def errors = new ArrayList<>();
3117
errors.add('*** Anchor reference errors found:')
@@ -71,10 +57,9 @@ asciidoctorPdf {
7157
}
7258

7359
baseDirFollowsSourceFile()
74-
configurations 'asciidoctorExt'
7560

7661
asciidoctorj {
77-
sourceDir "$buildDir/asciidoc"
62+
sourceDir "src/reference/asciidoc/"
7863
inputs.dir(sourceDir)
7964
sources {
8065
include 'index-single.adoc'
@@ -119,9 +104,12 @@ asciidoctor {
119104
jvmArgs '--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED', '--add-opens', 'java.base/java.io=ALL-UNNAMED'
120105
}
121106
baseDirFollowsSourceFile()
122-
configurations 'asciidoctorExt'
123-
sourceDir "$buildDir/asciidoc"
107+
configurations 'asciidoctorExtensions'
108+
sourceDir "src/reference/asciidoc/"
124109
inputs.dir(sourceDir)
110+
outputOptions {
111+
backends "spring-html"
112+
}
125113
resources {
126114
from(sourceDir) {
127115
include 'images/*', 'css/**', 'js/**'

src/reference/asciidoc/amqp.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public MessageHandler handler() {
127127
tx-size="" <25>
128128
consumers-per-queue <26>
129129
batch-mode="MESSAGES"/> <27>
130-
----
131130
132131
<1> The unique ID for this adapter.
133132
Optional.
@@ -221,7 +220,7 @@ See the https://docs.spring.io/spring-amqp/reference/html/[Spring AMQP Reference
221220
When set to `MESSAGES` (default), the payload is a `List<Message<?>>` where each message has headers mapped from the incoming AMQP `Message` and the payload is the converted `body`.
222221
When set to `EXTRACT_PAYLOADS`, the payload is a `List<?>` where the elements are converted from the AMQP `Message` body.
223222
`EXTRACT_PAYLOADS_WITH_HEADERS` is similar to `EXTRACT_PAYLOADS` but, in addition, the headers from each message are mapped from the `MessageProperties` into a `List<Map<String, Object>` at the corresponding index; the header name is `AmqpInboundChannelAdapter.CONSOLIDATED_HEADERS`.
224-
223+
----
225224
====
226225

227226
[NOTE]

src/reference/asciidoc/message-history.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ To enable message history, you need only define the `message-history` element (o
1616

1717
====
1818
[source, java, role="primary"]
19+
.Java
1920
----
2021
@Configuration
2122
@EnableIntegration
2223
@EnableMessageHistory
2324
----
2425
[source, xml, role="secondary"]
26+
.XML
2527
----
2628
<int:message-history/>
2729
----
@@ -35,6 +37,7 @@ Consider the following configuration example:
3537

3638
====
3739
[source, java, role="primary"]
40+
.Java
3841
----
3942
@MessagingGateway(defaultRequestChannel = "bridgeInChannel")
4043
public interface SampleGateway {
@@ -50,6 +53,7 @@ HeaderEnricher sampleEnricher() {
5053
}
5154
----
5255
[source, xml, role="secondary"]
56+
.XML
5357
----
5458
<int:gateway id="sampleGateway"
5559
service-interface="org.springframework.integration.history.sample.SampleGateway"
@@ -94,12 +98,14 @@ The following example shows how to do so:
9498

9599
====
96100
[source, java, role="primary"]
101+
.Java
97102
----
98103
@Configuration
99104
@EnableIntegration
100105
@EnableMessageHistory("*Gateway", "sample*", "aName")
101106
----
102107
[source, xml, role="secondary"]
108+
.XML
103109
----
104110
<int:message-history tracked-components="*Gateway, sample*, aName"/>
105111
----

0 commit comments

Comments
 (0)