Skip to content

Commit 433e73a

Browse files
Jay Bryantgaryrussell
authored andcommitted
Upgrade Asciidoctor
Upgrade Asciidoctor to the latest version, to eliminate technical debt.
1 parent 6fc8ce4 commit 433e73a

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

build.gradle

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ buildscript {
44
maven { url 'https://repo.spring.io/plugins-release' }
55
}
66
dependencies {
7-
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-beta.6'
87
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
98
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
109
}
@@ -15,11 +14,13 @@ plugins {
1514
id 'project-report'
1615
id 'idea'
1716
id 'org.sonarqube' version '2.8'
18-
id 'org.asciidoctor.convert' version '1.6.1'
1917
id 'org.ajoberstar.grgit' version '4.0.1' apply false
2018
id 'io.spring.nohttp' version '0.0.4.RELEASE'
2119
id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
2220
id 'com.jfrog.artifactory' version '4.13.0' apply false
21+
id 'org.asciidoctor.jvm.pdf' version '3.1.0'
22+
id 'org.asciidoctor.jvm.gems' version '3.1.0'
23+
id 'org.asciidoctor.jvm.convert' version '3.1.0'
2324
}
2425

2526
apply plugin: 'io.spring.nohttp'
@@ -341,26 +342,34 @@ task prepareAsciidocBuild(type: Sync) {
341342
into "$buildDir/asciidoc"
342343
}
343344

344-
task('makePDF', type: org.asciidoctor.gradle.AsciidoctorTask) {
345+
asciidoctorPdf {
345346
dependsOn prepareAsciidocBuild
346-
backends 'pdf'
347-
sourceDir "$buildDir/asciidoc"
348-
sources {
349-
include 'index.adoc'
350-
}
351-
options doctype: 'book', eruby: 'erubis'
352-
attributes 'icons': 'font',
347+
baseDirFollowsSourceFile()
348+
349+
asciidoctorj {
350+
sourceDir "$buildDir/asciidoc"
351+
inputs.dir(sourceDir)
352+
sources {
353+
include 'index.adoc'
354+
}
355+
options doctype: 'book'
356+
attributes 'icons': 'font',
353357
'sectanchors': '',
354358
'sectnums': '',
355359
'toc': '',
356360
'source-highlighter' : 'coderay',
357-
revnumber: project.version
361+
revnumber: project.version,
362+
'project-version': project.version
363+
}
358364
}
359365

360366
asciidoctor {
361-
dependsOn makePDF
362-
backends 'html5'
363-
sourceDir "$buildDir/asciidoc"
367+
dependsOn asciidoctorPdf
368+
baseDirFollowsSourceFile()
369+
sourceDir = file("$buildDir/asciidoc")
370+
sources {
371+
include '*.adoc'
372+
}
364373
resources {
365374
from(sourceDir) {
366375
include 'images/*', 'css/**', 'js/**'
@@ -374,16 +383,17 @@ asciidoctor {
374383
'linkcss': true,
375384
'icons': 'font',
376385
'sectanchors': '',
377-
'source-highlighter=highlight.js',
378-
'highlightjsdir=js/highlight',
386+
'source-highlighter': 'highlight.js',
387+
'highlightjsdir': 'js/highlight',
379388
'highlightjs-theme': 'github',
380389
'idprefix': '',
381390
'idseparator': '-',
382391
'spring-version': project.version,
383392
'allow-uri-read': '',
384393
'toc': 'left',
385394
'toclevbels': '4',
386-
revnumber: project.version
395+
revnumber: project.version,
396+
'project-version': project.version
387397
}
388398

389399
task reference(dependsOn: asciidoctor) {

src/reference/asciidoc/kafka.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ private KafkaAdmin admin;
139139
----
140140
====
141141

142+
[[sending-messages]]
142143
==== Sending Messages
143144

144145
This section covers how to send messages.
@@ -726,6 +727,7 @@ IMPORTANT: The listener container for the replies MUST be configured with `AckMo
726727
To avoid any possibility of losing messages, the template only commits offsets when there are zero requests outstanding, i.e. when the last outstanding request is released by the release strategy.
727728
After a rebalance, it is possible for duplicate reply deliveries; these will be ignored for any in-flight requests; you may see error log messages when duplicate replies are received for already released replies.
728729

730+
[[receiving-messages]]
729731
==== Receiving Messages
730732

731733
You can receive messages by configuring a `MessageListenerContainer` and providing a message listener or by using the `@KafkaListener` annotation.
@@ -828,7 +830,7 @@ The `ConcurrentMessageListenerContainer` delegates to one or more `KafkaMessageL
828830

829831
Starting with version 2.2.7, you can add a `RecordInterceptor` to the listener container; it will be invoked before calling the listener allowing inspection or modification of the record.
830832
If the interceptor returns null, the listener is not called.
831-
The interceptor is not invoked when the listener is a <<batch-listners, batch listener>>.
833+
The interceptor is not invoked when the listener is a <<batch-listeners, batch listener>>.
832834

833835
Starting with version 2.3, the `CompositeRecordInterceptor` can be used to invoke multiple interceptors.
834836

0 commit comments

Comments
 (0)