@@ -12,13 +12,14 @@ buildscript {
12
12
classpath ' io.spring.gradle:spring-io-plugin:0.0.5.RELEASE'
13
13
classpath " io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE"
14
14
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"
17
15
}
18
16
}
19
17
20
18
plugins {
21
19
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'
22
23
}
23
24
24
25
ext {
@@ -657,12 +658,6 @@ project('spring-batch-samples') {
657
658
}
658
659
}
659
660
660
- apply plugin : " org.asciidoctor.convert"
661
-
662
- asciidoctorj {
663
- version = ' 1.5.5'
664
- }
665
-
666
661
configurations {
667
662
docs
668
663
}
@@ -683,26 +678,31 @@ task prepareAsciidocBuild(type: Sync) {
683
678
into " $buildDir /asciidoc/assemble"
684
679
}
685
680
686
- task( ' makePDF ' , type : org.asciidoctor.gradle.AsciidoctorTask ) {
681
+ asciidoctorPdf {
687
682
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' ,
696
694
' sectanchors' : ' ' ,
697
695
' sectnums' : ' ' ,
698
696
' toc' : ' ' ,
699
697
' source-highlighter' : ' coderay' ,
700
- revnumber : project. version
698
+ revnumber : project. version,
699
+ ' project-version' : project. version
700
+ }
701
701
}
702
702
703
703
asciidoctor {
704
- dependsOn makePDF
705
- backends ' html5 '
704
+ dependsOn asciidoctorPdf
705
+ baseDirFollowsSourceFile()
706
706
sourceDir " $buildDir /asciidoc/assemble"
707
707
resources {
708
708
from(sourceDir) {
@@ -719,9 +719,9 @@ asciidoctor {
719
719
' icons' : ' font' ,
720
720
' sectanchors' : ' ' ,
721
721
// 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' ,
725
725
' idprefix' : ' ' ,
726
726
' idseparator' : ' -' ,
727
727
' spring-version' : project. version,
@@ -809,7 +809,7 @@ task docsZip(type: Zip) {
809
809
into ' api'
810
810
}
811
811
812
- from (makePDF ) {
812
+ from (asciidoctorPdf ) {
813
813
include " index-single.pdf"
814
814
rename ' index-single.pdf' , ' spring-batch-reference.pdf'
815
815
into ' reference/pdf'
0 commit comments