forked from se-edu/addressbook-level2
-
Notifications
You must be signed in to change notification settings - Fork 35
/
build.gradle.txt
78 lines (66 loc) · 1.97 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// 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'
}
repositories {
mavenCentral()
}
checkstyle {
toolVersion = '7.1.2'
}
sourceSets {
main {
java {
srcDirs = ['src']
}
}
test {
java {
srcDirs = ['test/java']
}
}
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.8.1'
}
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-Level2',
'site-githuburl': 'https://github.com/se-edu/addressbook-level2',
'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)
}
}
// 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', 'test', 'asciidoctor'