Skip to content

Commit 2ef32cb

Browse files
Jay Bryantfmbenhassine
authored andcommitted
Upgrade versions of Asciidoctor
Upgrade the versions of Asciidoctor from 1.5/1.6 to 3.1.0, to reduce technical debt.
1 parent ffd3908 commit 2ef32cb

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

build.gradle

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ buildscript {
1212
classpath 'io.spring.gradle:spring-io-plugin:0.0.5.RELEASE'
1313
classpath "io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE"
1414
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2"
15-
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.6"
16-
classpath "org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16"
1715
}
1816
}
1917

2018
plugins {
2119
id 'org.sonarqube' version '2.6.2'
20+
id 'org.asciidoctor.jvm.pdf' version '3.1.0'
21+
id 'org.asciidoctor.jvm.gems' version '3.1.0'
22+
id 'org.asciidoctor.jvm.convert' version '3.1.0'
2223
}
2324

2425
ext {
@@ -657,12 +658,6 @@ project('spring-batch-samples') {
657658
}
658659
}
659660

660-
apply plugin: "org.asciidoctor.convert"
661-
662-
asciidoctorj {
663-
version = '1.5.5'
664-
}
665-
666661
configurations {
667662
docs
668663
}
@@ -683,26 +678,31 @@ task prepareAsciidocBuild(type: Sync) {
683678
into "$buildDir/asciidoc/assemble"
684679
}
685680

686-
task('makePDF', type: org.asciidoctor.gradle.AsciidoctorTask){
681+
asciidoctorPdf {
687682
dependsOn prepareAsciidocBuild
688-
backends 'pdf'
689-
sourceDir "$buildDir/asciidoc/assemble"
690-
sources {
691-
include 'index-single.adoc'
692-
}
693-
options doctype: 'book', eruby: 'erubis'
694-
logDocuments = true
695-
attributes 'icons': 'font',
683+
baseDirFollowsSourceFile()
684+
685+
asciidoctorj {
686+
sourceDir "$buildDir/asciidoc/assemble"
687+
inputs.dir(sourceDir)
688+
sources {
689+
include 'index-single.adoc'
690+
}
691+
options doctype: 'book'
692+
logDocuments = true
693+
attributes 'icons': 'font',
696694
'sectanchors': '',
697695
'sectnums': '',
698696
'toc': '',
699697
'source-highlighter' : 'coderay',
700-
revnumber: project.version
698+
revnumber: project.version,
699+
'project-version': project.version
700+
}
701701
}
702702

703703
asciidoctor {
704-
dependsOn makePDF
705-
backends 'html5'
704+
dependsOn asciidoctorPdf
705+
baseDirFollowsSourceFile()
706706
sourceDir "$buildDir/asciidoc/assemble"
707707
resources {
708708
from(sourceDir) {
@@ -719,9 +719,9 @@ asciidoctor {
719719
'icons': 'font',
720720
'sectanchors': '',
721721
// use provided highlighter
722-
'source-highlighter=highlight.js',
723-
'highlightjsdir=js/highlight',
724-
'highlightjs-theme=github',
722+
'source-highlighter': 'highlight.js',
723+
'highlightjsdir': 'js/highlight',
724+
'highlightjs-theme': 'github',
725725
'idprefix': '',
726726
'idseparator': '-',
727727
'spring-version': project.version,
@@ -809,7 +809,7 @@ task docsZip(type: Zip) {
809809
into 'api'
810810
}
811811

812-
from (makePDF) {
812+
from (asciidoctorPdf) {
813813
include "index-single.pdf"
814814
rename 'index-single.pdf', 'spring-batch-reference.pdf'
815815
into 'reference/pdf'

0 commit comments

Comments
 (0)