generated from RyosukeDTomita/template_repository_all
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
37 lines (30 loc) · 977 Bytes
/
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
plugins {
id 'org.asciidoctor.jvm.convert' version '4.0.2'
}
repositories {
mavenCentral()
}
// NOTE: Gradleにはデフォルトでcleanタスクが存在し、build/を削除可能
// NOTE: asciidoctorタスクはplugin側で定義されているのでタスクの定義不要
asciidoctor {
baseDir file('src/docs/asciidoc')
outputDir file('build/docs/html')
attributes 'version': new Date().format('yyyy.MM.dd') // for `:revnumber:`
}
// asciidoctorから呼び出され、図等を埋め込む
asciidoctorj {
modules {
diagram.use()
diagram.version '2.3.1'
}
attributes "source-highlighter" : "rouge"
}
// NOTE: `gradle asciidoctor`実行時に.svgファイルがあると更新されないため削除する
task cleanPlantUML(type: Delete) {
delete fileTree('build/docs/html/') {
include '**/*.svg'
}
}
asciidoctor.dependsOn cleanPlantUML
// `gradle`でコンパイルするためのエイリアス
defaultTasks 'asciidoctor'