This is a user manual for an example project.

Introduction

This project does something. We just haven’t decided what that is yet.

Source Code

Java code from project
public boolean contains(String haystack, String needle) {
    return haystack.contains(needle);
}

This page was built by the following command:

$ ./gradlew asciidoctor

Images

sunset

Attributes

Built-in
asciidoctor-version

1.5.2

safe-mode-name

unsafe

docdir

/home/travis/build/asciidoctor/asciidoctor-gradle-examples/asciidoc-to-all-example/src/docs/asciidoc

docfile

/home/travis/build/asciidoctor/asciidoctor-gradle-examples/asciidoc-to-all-example/src/docs/asciidoc/example-manual.adoc

imagesdir

./images

Custom
project-version

1.0.0-SNAPSHOT

sourcedir

/home/travis/build/asciidoctor/asciidoctor-gradle-examples/asciidoc-to-all-example/src/main/java

endpoint-url

http://example.org

Includes

include::subdir/_b.adoc[]

content from src/docs/asciidoc/subdir/_b.adoc.

include::_c.adoc[]

content from src/docs/asciidoc/subdir/c.adoc.

Includes can be tricky!

build.gradle

buildscript {
        dependencies {
                classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.4'
                classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.6'
        }
}

plugins {
  id 'org.asciidoctor.convert' version '1.5.2'
}

apply plugin: 'java'
apply plugin: 'org.asciidoctor.convert'

version = '1.0.0-SNAPSHOT'

asciidoctorj {
        version = '1.5.2'
}

asciidoctor {
        backends    'html5','pdf','epub3'
        attributes        'build-gradle': file('build.gradle'),
                                'sourcedir': project.sourceSets.main.java.srcDirs[0],
                                'endpoint-url': 'http://example.org',
                                'source-highlighter' : 'coderay',
                                'imagesdir': './images',
                                'toc':'left',
                                'icons': 'font',
                                'setanchors':'true',
                                'idprefix':'',
                                'idseparator':'-',
                                'docinfo1':'true'
}