-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
151 lines (124 loc) · 4.26 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:1.0-beta3'
classpath 'commons-httpclient:commons-httpclient:3.1'
classpath 'org.ajoberstar:gradle-git:1.1.0'
classpath 'io.ratpack:ratpack-groovy:1.2.0'
classpath 'org.kordamp.gradle:livereload-gradle-plugin:0.2.1'
// JUnit5 Gradle Plugin
// classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.1'
}
}
plugins {
id 'com.github.jruby-gradle.base' version '1.4.0'
}
repositories {
jcenter()
}
apply plugin: 'com.github.jruby-gradle.base'
apply plugin: 'org.ysb33r.vfs'
apply plugin: 'java'
// Spock
apply plugin: "groovy"
apply plugin: "jacoco"
// JUnit5 Gradle Plugin
//apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'org.kordamp.gradle.livereload'
dependencies {
gems 'rubygems:slim:3.0.8'
gems 'rubygems:thread_safe:0.3.5'
}
ext.junit4Version = '4.12'
ext.junitVintageVersion = '4.12.2'
ext.junitPlatformVersion = '1.0.2'
ext.junitJupiterVersion = '5.0.2'
dependencies {
// JUnit Jupiter API and TestEngine implementation
// Typically it should be testCompile or testRuntime)
compile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
runtime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
compile("org.junit.jupiter:junit-jupiter-params:${junitJupiterVersion}")
// If you also want to support JUnit 3 and JUnit 4 tests
// Typically it should be testCompile or testRuntime)
compile("junit:junit:${junit4Version}")
runtime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")
// To avoid compiler warnings about @API annotations in JUnit code
compileOnly('org.apiguardian:apiguardian-api:1.0.0')
// Spock Framework
compile "org.codehaus.groovy:groovy-all:2.4.10"
testCompile "org.spockframework:spock-core:1.1-groovy-2.4"
// Spock Reports
testCompile('com.athaydes:spock-reports:1.4.0') {
transitive = false // this avoids affecting your version of Groovy/Spock
}
// if you don't already have slf4j-api and an implementation of it in the classpath, add this!
testCompile 'org.slf4j:slf4j-api:1.7.13'
testCompile 'org.slf4j:slf4j-simple:1.7.13'
}
ext {
revealjsVersion = '3.5.0'
asciidoctorBackendVersion = '1.0.3'
downloadDir = new File(buildDir, 'download')
templateDir = new File(downloadDir, 'templates')
revealJsDir = new File(downloadDir, 'reveal.js')
}
asciidoctorj {
version = '1.5.6'
}
apply from: 'gradle/pdf.gradle'
task download {
doLast {
mkdir downloadDir
mkdir templateDir
vfs {
cp "zip:https://github.com/asciidoctor/asciidoctor-reveal.js/archive/v${asciidoctorBackendVersion}.zip!asciidoctor-reveal.js-${asciidoctorBackendVersion}",
templateDir, recursive: true, overwrite: true
cp "zip:https://github.com/hakimel/reveal.js/archive/${revealjsVersion}.zip!reveal.js-${revealjsVersion}",
revealJsDir, recursive: true, overwrite: true
}
}
}
task copyTheme(type: Copy) {
dependsOn download
from fileTree("$revealJsDir/reveal.js-${revealjsVersion}")
into revealJsDir
from fileTree('src/docs/theme')
into file("$revealJsDir/css/theme")
}
task copyScreencasts(type: Copy) {
from fileTree('src/docs/asciidoc/screencast')
into file("$buildDir/asciidoc/revealjs")
}
download {
description "Download extra deckjs/reveal.js resources"
inputs.property 'asciidoctorBackendVersion', asciidoctorBackendVersion
inputs.property 'revealjsVersion', revealjsVersion
outputs.dir templateDir
outputs.dir revealJsDir
}
apply from: 'gradle/asciidoctor.gradle'
apply from: 'gradle/github.gradle'
allprojects {
apply plugin: 'idea'
}
liveReload {
docRoot = "$buildDir/asciidoc/revealjs"
}
// Spock Reports
test {
systemProperty 'com.athaydes.spockframework.report.showCodeBlocks', true
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacoco-reports")
}
}
test.finalizedBy 'jacocoTestReport'