Skip to content

Instantly share code, notes, and snippets.

@rwinch
Created October 5, 2015 16:14
Show Gist options
  • Save rwinch/c197825845292130e67d to your computer and use it in GitHub Desktop.
Save rwinch/c197825845292130e67d to your computer and use it in GitHub Desktop.
Live Reload Server Gradle Build
plugins {
id 'org.asciidoctor.convert' version '1.5.2'
id 'org.kordamp.gradle.livereload' version '0.2.1'
}
apply plugin: 'java'
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'org.kordamp.gradle.livereload'
version = '1.0.0-SNAPSHOT'
asciidoctor {
def source = project.sourceSets.main.java.srcDirs[0]
def build = file('build.gradle')
// add extra inputs since these include files that are included
inputs.dir source
inputs.dir source
attributes 'build-gradle': file('build.gradle'),
'sourcedir': source,
'endpoint-url': 'http://example.org',
'source-highlighter' : 'coderay',
'imagesdir':'images',
'toc':'left',
'icons': 'font',
'setanchors':'true',
'idprefix':'',
'idseparator':'-',
'docinfo1':'true'
}
liveReload {
docRoot project.projectDir.canonicalPath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment