-
Notifications
You must be signed in to change notification settings - Fork 1k
/
build.gradle.txt
61 lines (52 loc) · 1.72 KB
/
build.gradle.txt
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
// Gradle Configuration File
// For more details take a look at the Java Quickstart chapter in the Gradle
// user guide available at http://gradle.org/docs/4.8.1/userguide/tutorial_java_projects.html
plugins {
id 'java'
id 'checkstyle'
id 'org.asciidoctor.convert' version '1.5.6'
}
asciidoctor {
backends 'html5'
sourceDir 'docs'
outputDir "${buildDir}/docs"
options = [
template_dirs: [file("${sourceDir}/templates")],
]
attributes = [
linkcss: true,
stylesheet: 'gh-pages.css',
'source-highlighter': 'coderay',
icons: 'font',
experimental: true,
sectlinks: true,
idprefix: '', // for compatibility with GitHub preview
idseparator: '-',
'site-root': "${sourceDir}", // must be the same as sourceDir, do not modify
'site-name': 'AddressBook-Level1',
'site-githuburl': 'https://github.com/se-edu/addressbook-level1',
'site-seedu': true, // delete this line if your project is not a fork (not a SE-EDU project)
]
options['template_dirs'].each {
inputs.files fileTree(it)
}
}
checkstyle {
toolVersion = '8.1'
}
sourceSets {
main {
java {
srcDirs = ['src']
}
}
}
// Copies stylesheets into the directory containing generated HTML files as
// Asciidoctor does not copy linked CSS files to the output directory when rendering.
// This is needed for linked stylesheets and embedded stylesheets which import other files.
task copyStylesheets(type: Copy) {
from "${asciidoctor.sourceDir}/stylesheets"
into "${asciidoctor.outputDir}/html5/stylesheets"
}
asciidoctor.dependsOn copyStylesheets
defaultTasks 'clean', 'asciidoctor', 'checkstyleMain'