Skip to content

Commit 28fdef9

Browse files
Jay Bryantartembilan
authored andcommitted
Upgrade to latest Asciidoctor versions
Upgrade to the latest versions of both asciidoctor and asciidoctorPdf, to avoid further technical debt.
1 parent 8a7ceea commit 28fdef9

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

build.gradle

Lines changed: 23 additions & 16 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'
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
description = 'Spring AMQP'
@@ -413,25 +414,30 @@ task prepareAsciidocBuild(type: Sync) {
413414
into "$buildDir/asciidoc"
414415
}
415416

416-
task('makePDF', type: org.asciidoctor.gradle.AsciidoctorTask) {
417+
asciidoctorPdf {
417418
dependsOn prepareAsciidocBuild
418-
backends 'pdf'
419-
sourceDir "$buildDir/asciidoc"
420-
sources {
421-
include 'index.adoc'
422-
}
423-
options doctype: 'book', eruby: 'erubis'
424-
attributes 'icons': 'font',
419+
baseDirFollowsSourceFile()
420+
421+
asciidoctorj {
422+
sourceDir "$buildDir/asciidoc"
423+
inputs.dir(sourceDir)
424+
sources {
425+
include 'index-single.adoc'
426+
}
427+
options doctype: 'book'
428+
attributes 'icons': 'font',
425429
'sectanchors': '',
426430
'sectnums': '',
427431
'toc': '',
428432
'source-highlighter' : 'coderay',
429-
revnumber: project.version
433+
revnumber: project.version,
434+
'project-version': project.version
435+
}
430436
}
431437

432438
asciidoctor {
433-
dependsOn makePDF
434-
backends 'html5'
439+
dependsOn asciidoctorPdf
440+
baseDirFollowsSourceFile()
435441
sourceDir "$buildDir/asciidoc"
436442
resources {
437443
from(sourceDir) {
@@ -446,16 +452,17 @@ asciidoctor {
446452
'linkcss': true,
447453
'icons': 'font',
448454
'sectanchors': '',
449-
'source-highlighter=highlight.js',
450-
'highlightjsdir=js/highlight',
455+
'source-highlighter': 'highlight.js',
456+
'highlightjsdir': 'js/highlight',
451457
'highlightjs-theme': 'github',
452458
'idprefix': '',
453459
'idseparator': '-',
454460
'spring-version': project.version,
455461
'allow-uri-read': '',
456462
'toc': 'left',
457463
'toclevbels': '4',
458-
revnumber: project.version
464+
revnumber: project.version,
465+
'project-version': project.version
459466
}
460467

461468
task reference(dependsOn: asciidoctor) {

0 commit comments

Comments
 (0)