forked from assertj/doc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
100 lines (84 loc) · 2.39 KB
/
build.gradle
File metadata and controls
100 lines (84 loc) · 2.39 KB
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
buildscript {
dependencies {
// upgrade to latest jruby version due to a bugfix needed for Windows 10.
// can be removed, when asciidoctorj uses this as a default version.
classpath('org.jruby:jruby-complete:9.1.17.0')
// classpath('org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.16')
classpath('org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16')
classpath('org.asciidoctor:asciidoctorj-diagram:1.5.9')
}
}
plugins {
id 'java'
id 'org.ajoberstar.github-pages' version '1.5.1'
id 'org.asciidoctor.gradle.asciidoctor' version '1.5.1'
id 'org.asciidoctor.convert' version '1.5.8.1'
}
dependencies {
asciidoctor('org.jruby:jruby-complete:9.1.17.0')
testCompile("org.assertj:assertj-core:" + project.getProperty('assertjCoreVersion'))
testCompile('org.junit.jupiter:junit-jupiter-api:5.4.0')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.4.0')
}
asciidoctorj {
version = '1.5.6'
}
ext {
docsVersion = project.version.contains('SNAPSHOT') ? 'snapshot' : project.version
generatedAsciiDocPath = buildDir.toPath().resolve('generated/asciidoc')
}
asciidoctor {
// enable the Asciidoctor Diagram extension
requires 'asciidoctor-diagram'
separateOutputDirs false
sources {
include '**/index.adoc'
}
resources {
from(sourceDir) {
include '**/images/**'
include '**/highlight/**'
include '**/*.css'
include '**/javadoc/**'
}
}
// backends 'html5', 'pdf'
backends 'html5'
attributes 'release-branch': releaseBranch,
'docs-version': docsVersion,
'revnumber' : version,
'releaseBranch' : version,
'testDir': '../../../test/java',
'outdir': outputDir.absolutePath,
'source-highlighter': 'highlightjs',
'highlightjsdir': 'highlight',
'highlightjs-theme': 'railscasts',
'tabsize': '3',
'toc': 'left',
'icons': 'font',
'sectanchors': true,
'idprefix': '',
'idseparator': '-',
'assertj-core-version': assertjCoreVersion,
'stylesheet': '../../../docs/asciidoc/asciidoctor.css',
'docinfo': 'shared-head'
}
githubPages {
repoUri = 'https://github.com/assertj/doc.git'
credentials {
username = project.hasProperty('githubToken') ? project.githubToken : ''
password = ''
}
pages {
from file(asciidoctor.outputDir.path + '/user-guide')
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
reports {
html.enabled = true
}
}