Upgrade to Asciidoctor 1.5.8 and remove asciidoctorj-diagram module
MODIFY
asciidoctorj-core/build.gradle
asciidoctorj-core/build.gradle
@@ -12,6 +12,7 @@ dependencies {
gems "rubygems:slim:$slimGemVersion"
gems "rubygems:thread_safe:$threadSafeGemVersion"
gems "rubygems:tilt:$tiltGemVersion"
+ gems "rubygems:concurrent-ruby:$concurrentRubyGemVersion"
// TODO could use dependency replacement feature to fix version of Saxon-HE
testCompile("org.xmlmatchers:xml-matchers:$xmlMatchersVersion") { exclude module: 'Saxon-HE' }
testCompile "net.sf.saxon:Saxon-HE:$saxonVersion"

DELETE
asciidoctorj-diagram/build.gradle
-dependencies {
- compile project(':asciidoctorj')
-
- testCompile project(path: ':asciidoctorj-arquillian-extension')
-
- gems("rubygems:asciidoctor-diagram:$asciidoctorDiagramGemVersion") {
- // Exclude gems provided by AsciidoctorJ core
- exclude module: 'asciidoctor'
- exclude module: 'thread_safe'
- }
-}
-
-def gemFiles = fileTree(jruby.gemInstallDir) {
- include 'specifications/*.gemspec'
- include 'gems/*/lib/**'
- include "gems/asciidoctor-diagram-${asciidoctorDiagramGemVersion}/data/**"
-}
-
-jrubyPrepare {
- doLast {
- copy { // bundles the gems inside this artifact
- from gemFiles
- into preparedGems
- }
- }
-}

DELETE
asciidoctorj-diagram/gradle.properties
-properName=AsciidoctorJ Diagram
-description=AsciidoctorJ Diagram bundles the Asciidoctor Diagram RubyGem (asciidoctor-diagram) so it can be loaded into the JVM using JRuby.
-version=1.5.9
-gem_name=asciidoctor-diagram

DELETE
asciidoctorj-diagram/src/test/java/org/asciidoctor/WhenDocumentContainsDitaaDiagram.java
-package org.asciidoctor;
-
-import java.io.File;
-
-import org.asciidoctor.arquillian.api.Unshared;
-import org.asciidoctor.util.ClasspathResources;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.asciidoctor.OptionsBuilder.options;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-@RunWith(Arquillian.class)
-public class WhenDocumentContainsDitaaDiagram {
-
- @ArquillianResource(Unshared.class)
- private Asciidoctor asciidoctor;
-
- @ArquillianResource
- private ClasspathResources classpath;
-
- @Test
- public void png_should_be_rendered_for_diagram() {
- File inputFile = classpath.getResource("sample.adoc");
- File outputFile1 = new File(inputFile.getParentFile(), "asciidoctor-diagram-process.png");
- File outputFile2 = new File(inputFile.getParentFile(), ".asciidoctor/diagram/asciidoctor-diagram-process.png.cache");
- asciidoctor.requireLibrary("asciidoctor-diagram");
- asciidoctor.convertFile(inputFile, options().backend("html5").get());
- assertThat(outputFile1.exists(), is(true));
- assertThat(outputFile2.exists(), is(true));
- outputFile1.delete();
- outputFile2.delete();
- }
-}

DELETE
asciidoctorj-diagram/src/test/resources/sample.adoc
-= Document Title
-
-[ditaa,asciidoctor-diagram-process]
-....
- +-------------+
- | Asciidoctor |-------+
- | diagram | |
- +-------------+ | PNG out
- ^ |
- | ditaa in |
- | v
- +--------+ +--------+----+ /---------------\
- | |---+ Asciidoctor +--->| |
- | Text | +-------------+ | Beautiful |
- |Document| | !magic! | | Output |
- | {d}| | | | |
- +---+----+ +-------------+ \---------------/
- : ^
- | Lots of work |
- +-----------------------------------+
-....
-

MODIFY
asciidoctorj-distribution/build.gradle
asciidoctorj-distribution/build.gradle
@@ -15,10 +15,10 @@ dependencies {
compile(project(':asciidoctorj-epub3')) {
transitive = false
}
- compile(project(':asciidoctorj-diagram')) {
+
+ compile("org.asciidoctor:asciidoctorj-diagram:$asciidoctorjDiagramVersion") {
transitive = false
}
-
compile("org.asciidoctor:asciidoctorj-pdf:$asciidoctorjPdfVersion") {
transitive = false
}

MODIFY
build.gradle
build.gradle
@@ -12,7 +12,7 @@ buildscript {
}
}
dependencies {
- classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7"
+ classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.10"
classpath "gradle.plugin.io.sdkman:gradle-sdkvendor-plugin:1.1.0"
}
@@ -39,6 +39,7 @@ ext {
arquillianVersion = '1.1.10.Final'
arquillianSpockVersion = '1.0.0.Beta3'
asciidoctorjPdfVersion = '1.5.0-alpha.16'
+ asciidoctorjDiagramVersion = '1.5.10'
commonsioVersion = '2.4'
guavaVersion = '18.0'
hamcrestVersion = '1.3'
@@ -52,9 +53,8 @@ ext {
pdfboxVersion = '1.8.10'
// gem versions
- asciidoctorGemVersion = project.hasProperty('asciidoctorGemVersion') ? project.asciidoctorGemVersion : '1.5.7.1'
+ asciidoctorGemVersion = project.hasProperty('asciidoctorGemVersion') ? project.asciidoctorGemVersion : '1.5.8'
asciidoctorEpub3GemVersion = project(':asciidoctorj-epub3').version.replace('-', '.')
- asciidoctorDiagramGemVersion = project(':asciidoctorj-diagram').version.replace('-', '.')
coderayGemVersion = '1.1.0'
codenarcVersion = '0.24.1'
@@ -63,6 +63,7 @@ ext {
hamlGemVersion = '4.0.5'
openUriCachedGemVersion = '0.0.5'
slimGemVersion = '3.0.6'
+ concurrentRubyGemVersion = '1.0.5'
spockVersion = '0.7-groovy-2.0'
threadSafeGemVersion = '0.3.6'
tiltGemVersion = '2.0.8'

MODIFY
settings.gradle
settings.gradle
@@ -4,7 +4,6 @@ include \
'asciidoctorj',
'asciidoctorj-arquillian-extension',
'asciidoctorj-api',
- 'asciidoctorj-diagram',
'asciidoctorj-epub3',
'asciidoctorj-distribution',
'asciidoctorj-documentation',

Upgrade to Asciidoctor 1.5.8 and remove asciidoctorj-diagram module