Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (54 sloc) 1.35 KB
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11'
classpath 'org.ajoberstar:gradle-git:1.6.0-rc.1'
}
}
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'org.ajoberstar.github-pages'
apply plugin: 'com.github.ben-manes.versions'
asciidoctorj {
version = '1.5.4.1'
}
asciidoctor {
backends 'pdf','html5'
outputDir = file("$buildDir/docs")
sources {
include 'index.asc'
}
resources {
from ('src/docs/asciidoc') {
include '**/*.png'
include '**/*.jpg'
include '**/*.jpeg'
}
}
options doctype: 'book'
attributes 'source-highlighter': 'prettify',
'toc': 'left',
'toc-title': 'Table of Contents'
}
defaultTasks 'asciidoctor'
task run(dependsOn:asciidoctor)
githubPages {
repoUri = 'https://github.com/FXDocs/docs.git'
pages {
from(file('build/docs/html5')) {
include 'index.html'
include '**/*.png'
include '**/*.jpg'
include '**/*.jpeg'
into '.'
}
from(file('build/docs/pdf')) {
include 'index.pdf'
rename ('index.pdf', 'book.pdf')
into '.'
}
}
}