You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/08/21 05:54:03 UTC

[groovy] 02/02: GROOVY-9697: Bump asciidoctor to 3.2.0 (experimental pdf support - still fails rendering some code/images) (closes #1350)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 973d230a9a8734e4d7473d0eece62a1b5fd0e975
Author: Paul King <pa...@asert.com.au>
AuthorDate: Fri Aug 21 15:51:48 2020 +1000

    GROOVY-9697: Bump asciidoctor to 3.2.0 (experimental pdf support - still fails rendering some code/images) (closes #1350)
---
 build.gradle              |  1 +
 gradle/asciidoctor.gradle |  6 +++---
 gradle/docs.gradle        | 14 +++++++++++++-
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/build.gradle b/build.gradle
index 092f659..fe674b4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -45,6 +45,7 @@ buildscript {
 }
 
 plugins {
+    id 'org.asciidoctor.jvm.pdf' version '3.2.0'
     id 'me.champeau.buildscan-recipes' version '0.2.3'
     id 'com.github.spotbugs' version '4.5.0'
     id 'com.github.ben-manes.versions' version '0.29.0'
diff --git a/gradle/asciidoctor.gradle b/gradle/asciidoctor.gradle
index 4e45715..623d841 100644
--- a/gradle/asciidoctor.gradle
+++ b/gradle/asciidoctor.gradle
@@ -76,10 +76,10 @@ asciidoctorj {
             }
         }
     }
-//    modules {
+    modules {
 //        diagram.version('2.0.2')
-//        pdf.version('1.5.3')
-//    }
+        pdf.version('1.5.3')
+    }
 }
 
 // skip the asciidoctor task if there's no directory with asciidoc files
diff --git a/gradle/docs.gradle b/gradle/docs.gradle
index 3e64a1f..1a4baa8 100644
--- a/gradle/docs.gradle
+++ b/gradle/docs.gradle
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-task doc(dependsOn: ['javadocAll', 'groovydocAll', 'docGDK', 'asciidocAll']) {
+task doc(dependsOn: ['javadocAll', 'groovydocAll', 'docGDK', 'asciidocAll', 'asciidoctorPdf']) {
     ext.footer = 'Copyright &copy; 2003-2020 The Apache Software Foundation. All rights reserved.'
     ext.title = "Groovy ${groovyVersion}"
 }
@@ -30,6 +30,18 @@ task asciidocAll(type: Copy) {
     into "$buildDir/asciidocAll/html5"
 }
 
+asciidoctorPdf {
+    baseDirIsRootProjectDir() // needed for asciidocAll
+    logDocuments = true
+    sourceDir = project.file('src/spec/doc')
+    sources {
+        include 'index.adoc'
+    }
+    outputDir = "$buildDir/asciidoc/pdf"
+    attributes 'rootProjectDir': rootProject.projectDir,
+            specfolder: 'src/spec/doc'
+}
+
 def javadocSpec = {
     maxMemory = javaDoc_mx
     project.configure(options) {