-
Notifications
You must be signed in to change notification settings - Fork 44
/
build.gradle
58 lines (50 loc) · 1.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
task bibliographyMarkdown {
inputs.dir '.'
doLast {
mkdir "$rootDir/build"
exec {
workingDir '.'
commandLine 'pandoc', "-t", "gfm", "-s", "--csl", "apa-numeric-superscript-brackets.csl", "--citeproc", "-o", "$rootDir/build/bibliography.md", "bibliography.tex"
}
}
}
task bibliographyPdflatex {
inputs.dir '.'
doLast{
mkdir "./temp"
mkdir "$rootDir/build"
copy {
from 'bibliography.tex', 'bibliography.bib'
into 'temp'
}
exec {
workingDir 'temp'
commandLine 'pdflatex', "bibliography.tex"
}
exec {
workingDir 'temp'
commandLine 'bibtex', "bibliography"
}
exec {
workingDir 'temp'
commandLine 'pdflatex', "bibliography.tex"
}
exec {
workingDir 'temp'
commandLine 'pdflatex', "bibliography.tex"
}
copy {
from 'temp/bibliography.pdf'
into "$rootDir/build/"
}
delete 'temp'
}
}
task build {
dependsOn bibliographyMarkdown
dependsOn bibliographyPdflatex
inputs.dir '.'
def outputDir = file("$rootDir/build/")
outputs.dir outputDir
doLast {}
}