-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
55 lines (37 loc) · 1.32 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
plugins {
id "com.moowork.node" version "0.8"
}
apply plugin: 'com.moowork.node'
apply plugin: 'java'
sourceSets {
examples
}
node {
// Version of node to use.
version = '0.12.7'
// Version of npm to use.
npmVersion = '2.11.3'
// Base URL for fetching node distributions (change if you have a mirror).
distBaseUrl = 'http://nodejs.org/dist'
// If true, it will download node using above parameters.
// If false, it will try to use globally installed node.
download = false
workDir = file("${project.buildDir}/nodejs")
}
task buildDocsPdf(type: Exec, dependsOn: 'npmInstall') {
inputs.dir('${project.projectDir}/src/examples')
executable = 'node_modules/.bin/gitbook'
args = ['pdf', './src/book', "${project.buildDir}/docs/book.pdf", "--verbose"]
}
task buildDocs(type: Exec, dependsOn: 'npmInstall') {
inputs.dir('${project.projectDir}/src/examples')
executable = 'node_modules/.bin/gitbook'
args = ['build', './src/book', "${project.buildDir}/docs", "--verbose"]
}
task serveDocs(type:Exec, dependsOn: 'npmInstall') {
inputs.dir('${project.projectDir}/src/examples')
executable = 'node_modules/.bin/gitbook'
args = ['serve', './src/book', "${project.buildDir}/docs", '--verbose']
}
assemble.dependsOn buildDocs
buildDocs.dependsOn examplesClasses