-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
67 lines (52 loc) · 1.56 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.7'
classpath 'me.champeau.gradle:jbake-gradle-plugin:0.2'
classpath 'org.jbake:jbake-core:2.3.2'
classpath 'org.asciidoctor:asciidoctorj:1.5.2'
classpath 'org.ajoberstar:gradle-git:0.12.0'
classpath 'com.bluepapa32:gradle-watch-plugin:0.1.4'
}
}
apply plugin: 'base'
apply plugin: 'jetty'
apply plugin: 'me.champeau.jbake'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'org.ajoberstar.github-pages'
apply plugin: 'com.bluepapa32.watch'
jbake {
configuration['asciidoctor.attributes.export'] = true
configuration['asciidoctor.attributes.export.prefix'] = 'jbake-'
configuration['project-build-dir'] = project.buildDir.absolutePath
}
task(site, type: Copy, dependsOn: [jbake]) {
destinationDir = file("$buildDir/site")
from jbake.output
}
watch {
site_gen {
files fileTree(dir: 'src/jbake', include: '**/*.adoc')
tasks 'site'
}
}
jettyRun {
contextPath = ''
webAppSourceDirectory = file(site.destinationDir)
}
task(siteRun, dependsOn: ['site', 'jettyRun']) { }
if (!project.hasProperty('githubUsername')) ext.githubUsername = ''
if (!project.hasProperty('githubPassword')) ext.githubPassword = ''
githubPages {
repoUri = 'https://github.com/jsr377/site'
pages {
from site.outputs.files
}
credentials {
username = githubUsername
password = githubPassword
}
}
publishGhPages.dependsOn(site)