This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
90 lines (76 loc) · 2.45 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
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:0.4.0'
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 'org.kordamp.gradle:livereload-gradle-plugin:0.2.1'
}
}
repositories {
jcenter()
}
apply plugin: 'com.github.jruby-gradle.base'
apply plugin: 'org.ysb33r.vfs'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.asciidoctor.convert'
apply from: 'gradle/github.gradle'
apply from: 'gradle/pdf.gradle'
apply plugin: 'org.kordamp.gradle.livereload'
dependencies {
gems 'rubygems:slim:2.1.0'
gems 'rubygems:thread_safe:0.3.4'
}
ext {
revealjsVersion = '2.6.2'
asciidoctorBackendVersion = 'master'
downloadDir = new File(buildDir, 'download')
templateDir = new File(downloadDir, 'templates')
revealJsDir = new File(downloadDir, 'reveal.js')
}
asciidoctorj {
version = '1.5.4'
}
task download {
doLast {
mkdir downloadDir
mkdir templateDir
vfs {
cp "zip:https://github.com/asciidoctor/asciidoctor-reveal.js/archive/${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")
}
liveReload {
docRoot = "$buildDir/asciidoc/revealjs"
}
githubPages {
repoUri = 'git@github.com:antonmry/talk-vigotech-2017-introduction-to-apache-kafka.git'
}
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'