-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
62 lines (52 loc) · 1.47 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
plugins {
id 'org.asciidoctor.convert' version '2.2.0'
id 'org.ajoberstar.git-publish' version '2.0.0'
}
wrapper {
gradleVersion = '5.0'
}
def buildDate() {
return new Date().format('yyyy-MM-dd')
}
asciidoctorj {
version = "$asciidoctorjVersion"
}
asciidoctor {
sourceDir = file('docs')
outputDir = file('build/docs')
attributes = ['revdate' : "${buildDate()}",
'project-version' : "$version",
'gh-repo-owner' : "$githubRepositoryOwner",
'gh-repo-name' : "$githubRepositoryName",
'source-highlighter': 'coderay',
'imagesdir' : '',
'toc' : 'left',
'icons' : 'font',
'sectanchors' : 'true',
'idprefix' : '',
'idseparator' : '-',
'docinfo1' : 'true']
repositories {
mavenCentral()
}
dependencies {
asciidoctor "fr.jmini.asciidoctorj:git-link:3.2.1"
}
}
gitPublish {
repoUri = '[email protected]:' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '.git'
branch = 'gh-pages'
contents {
from "${file('build/docs/html5')}"
}
preserve {
include '.nojekyll'
}
commitMessage = "Update the 'gh-pages' branch."
}
task releaseBuild {
dependsOn(
'asciidoctor',
'gitPublishPush'
)
}