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
Attributes
Built-in
- asciidoctor-version
-
1.5.4
- safe-mode-name
-
unsafe
- docdir
-
/home/travis/build/rwinch/asciidoctor-gradle-examples/asciidoc-to-all-example/src/docs/asciidoc
- docfile
-
/home/travis/build/rwinch/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/rwinch/asciidoctor-gradle-examples/asciidoc-to-all-example/src/main/java
- endpoint-url
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.6'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11'
}
}
plugins {
id 'org.asciidoctor.convert' version '1.5.3'
}
apply plugin: 'java'
apply plugin: 'org.asciidoctor.convert'
version = '1.0.0-SNAPSHOT'
asciidoctorj {
version = '1.5.4'
}
asciidoctor {
backends 'html5','pdf','epub3','docbook'
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'
}