-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
71 lines (56 loc) · 2.23 KB
/
build.gradle
File metadata and controls
71 lines (56 loc) · 2.23 KB
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
67
68
69
70
71
/*
Build.gradle script to construct the GPars Website
from a terminal command line, 'cd' into this folder then:
gradlew
this runs the defaultTasks below using the gradle wrapper tool gradlew <or> bash ./gradlew
*/
apply plugin: 'groovy'
apply plugin: 'war'
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
apply plugin: 'org.asciidoctor.convert'
defaultTasks 'clean','asciidoctor', 'build', 'war'
// logic to suport asciidoctor html, pdf and diagrams output
buildscript {
repositories {
jcenter()
maven{ url "http://repository.jboss.org/maven2/"}
}
dependencies {
classpath "org.asciidoctor:asciidoctor-gradle-plugin:${asciidoctorVersion}"
classpath fileTree(dir: "$projectDir/src/main/webapp/WEB-INF/lib", include: ['*.jar'])
//classpath("org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11") // for PDF's
}
}
repositories {
mavenCentral()
}
dependencies {
compile "org.codehaus.groovy:groovy-all:${groovyVersion}"
runtime "org.jruby:jruby-complete:${jrubyVersion}"
runtime "com.beust:jcommander:${jcommanderVersion}"
runtime "org.asciidoctor:asciidoctorj:${asciidoctorjVersion}"
runtime "org.codehaus.groovy:groovy-all:${groovyVersion}"
runtime "redis.clients:jedis:${jedisVersion}" // potential page caching service if Redis service available on PaaS target
}
war {
archiveName 'Website.war'
from 'src/main/resources' // adds a file-set to the root of the archive
}
// closure for asciidoctor plugin; chg these values to influence asciidoctor task
asciidoctor {
sourceDir = file('src/docs/asciidoc') //'src/docs/asciidoc') // plugin reads all *.adoc files in this folder and any sub-folder
outputDir = file('src/main/webapp') //main/tester') // file("$buildDir/docs")
separateOutputDirs=false // true creates two folders within the outDir path one for /html, one for /pdf
backends = ['html5' ] // to create both html and pdf output: backends = ['html5' ,'pdf']
options = [
doctype: 'book',
attributes: [
'source-highlighter': 'coderay',
'toc-title' : 'Table of Contents',
'toc' : 'right'
]
]
}
task wrapper(type: Wrapper) {
gradleVersion = "${gradleVersion}"
}