@@ -4,7 +4,6 @@ buildscript {
4
4
maven { url ' https://repo.spring.io/plugins-release' }
5
5
}
6
6
dependencies {
7
- classpath ' org.asciidoctor:asciidoctorj-pdf:1.5.0-beta.6'
8
7
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion "
9
8
classpath " org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion "
10
9
}
@@ -15,11 +14,13 @@ plugins {
15
14
id ' project-report'
16
15
id ' idea'
17
16
id ' org.sonarqube' version ' 2.8'
18
- id ' org.asciidoctor.convert' version ' 1.6.1'
19
17
id ' org.ajoberstar.grgit' version ' 4.0.1'
20
18
id ' io.spring.nohttp' version ' 0.0.4.RELEASE'
21
19
id ' io.spring.dependency-management' version ' 1.0.9.RELEASE' apply false
22
20
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'
23
24
}
24
25
25
26
description = ' Spring AMQP'
@@ -413,25 +414,30 @@ task prepareAsciidocBuild(type: Sync) {
413
414
into " $buildDir /asciidoc"
414
415
}
415
416
416
- task( ' makePDF ' , type : org.asciidoctor.gradle.AsciidoctorTask ) {
417
+ asciidoctorPdf {
417
418
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' ,
425
429
' sectanchors' : ' ' ,
426
430
' sectnums' : ' ' ,
427
431
' toc' : ' ' ,
428
432
' source-highlighter' : ' coderay' ,
429
- revnumber : project. version
433
+ revnumber : project. version,
434
+ ' project-version' : project. version
435
+ }
430
436
}
431
437
432
438
asciidoctor {
433
- dependsOn makePDF
434
- backends ' html5 '
439
+ dependsOn asciidoctorPdf
440
+ baseDirFollowsSourceFile()
435
441
sourceDir " $buildDir /asciidoc"
436
442
resources {
437
443
from(sourceDir) {
@@ -446,16 +452,17 @@ asciidoctor {
446
452
' linkcss' : true ,
447
453
' icons' : ' font' ,
448
454
' sectanchors' : ' ' ,
449
- ' source-highlighter= highlight.js' ,
450
- ' highlightjsdir= js/highlight' ,
455
+ ' source-highlighter' : ' highlight.js' ,
456
+ ' highlightjsdir' : ' js/highlight' ,
451
457
' highlightjs-theme' : ' github' ,
452
458
' idprefix' : ' ' ,
453
459
' idseparator' : ' -' ,
454
460
' spring-version' : project. version,
455
461
' allow-uri-read' : ' ' ,
456
462
' toc' : ' left' ,
457
463
' toclevbels' : ' 4' ,
458
- revnumber : project. version
464
+ revnumber : project. version,
465
+ ' project-version' : project. version
459
466
}
460
467
461
468
task reference (dependsOn : asciidoctor) {
0 commit comments