Skip to content

Instantly share code, notes, and snippets.

@mraible
Created April 17, 2015 23:20
Show Gist options
  • Select an option

  • Save mraible/71a64fcf30c3fa028dde to your computer and use it in GitHub Desktop.

Select an option

Save mraible/71a64fcf30c3fa028dde to your computer and use it in GitHub Desktop.
build.gradle with watch
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.8'
classpath 'com.bluepapa32:gradle-watch-plugin:0.1.5'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.4'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.6'
}
}
apply plugin: 'java'
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.bluepapa32.watch'
version = '1.0.0-SNAPSHOT'
asciidoctorj {
version = '1.5.2'
}
asciidoctor {
backends 'html5', 'pdf', 'epub3'
attributes 'sourcedir': project.sourceSets.main.java.srcDirs[0],
'endpoint-url': 'http://www.jhipster-book.com/',
'source-highlighter': 'coderay',
'imagesdir': './images',
toc: 'left',
icons: 'font',
linkattrs: true,
encoding: 'utf-8',
'setanchors': 'true',
'idprefix': '',
'idseparator': '-',
'docinfo1': 'true'
}
watch {
asciidoc {
files fileTree(dir: 'src/docs/asciidoc', include: '**/*.adoc')
tasks 'asciidoctor'
}
}
@RobWin
Copy link

RobWin commented Apr 18, 2015

Nice. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment