-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.gradle
99 lines (83 loc) · 2.27 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
90
91
92
93
94
95
96
97
98
99
plugins {
id 'java'
id 'org.ajoberstar.git-publish' version '3.0.1'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
}
dependencies {
testImplementation("org.assertj:assertj-core:" + project.getProperty('assertjVersion'))
testImplementation("org.assertj:assertj-joda-time:" + project.getProperty('assertjJodaTimeVersion'))
testImplementation("org.assertj:assertj-db:" + project.getProperty('assertjDbVersion'))
testImplementation('junit:junit:4.13.2')
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
ext {
docsVersion = project.version.contains('SNAPSHOT') ? 'snapshot' : project.version
generatedAsciiDocPath = buildDir.toPath().resolve('generated/asciidoc')
}
asciidoctor {
forkOptions {
jvmArgs("--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED")
}
baseDirFollowsSourceFile()
sources {
include '**/index.adoc'
}
resources {
from(sourceDir) {
include '**/images/**'
include '**/highlight/**'
include '**/tocbot-3.0.2/**'
include '**/*.css'
include '**/font-awesome/css/*.css'
include '**/javadoc/**'
include '**/reports/**'
}
}
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-version': assertjVersion,
'assertj-joda-time-version': assertjJodaTimeVersion,
'assertj-db-version': assertjDbVersion,
'stylesheet': '../../../docs/asciidoc/asciidoctor.css',
'docinfo': 'shared',
'source-indent': '0'
}
asciidoctorj {
modules {
diagram.use()
}
}
gitPublish {
repoUri = 'https://github.com/assertj/doc.git'
branch = 'gh-pages'
contents {
from file(asciidoctor.outputDir.path + '/user-guide')
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
reports {
html.required = true
}
}
repositories {
mavenCentral()
}