forked from nusCS2113-AY1920S1/PersonalAssistant-Duke
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
153 lines (128 loc) · 4.85 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
plugins {
id 'java'
id 'application'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'org.asciidoctor.convert' version '1.5.6'
id 'com.github.kt3k.coveralls' version '2.8.4'
id 'jacoco'
}
checkstyle {
toolVersion = '8.23'
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
html.destination file("${buildDir}/jacocoHtml")
}
}
task coverage(type: JacocoReport) {
sourceDirectories.from files(sourceSets.main.allSource.srcDirs)
classDirectories.from files(sourceSets.main.output)
executionData.from files(jacocoTestReport.executionData)
afterEvaluate {
classDirectories.from files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['**/*.jar'])
})
}
reports {
html.enabled = true
xml.enabled = true
}
}
coveralls {
sourceDirs = sourceSets.main.allSource.srcDirs.absolutePath
jacocoReportPath = "${buildDir}/reports/jacoco/coverage/coverage.xml"
}
tasks.coveralls {
dependsOn coverage
}
shadowJar {
archiveBaseName = "AlgoSenpaiAdventures"
archiveVersion = "1.3.3"
archiveClassifier = null
archiveAppendix = null
}
group 'com.algosenpai.app'
version '0.1.0'
repositories {
mavenCentral()
}
application {
mainClassName = "com.algosenpai.app.Launcher"
}
run {
standardInput = System.in
}
dependencies {
implementation group: 'org.openjfx', name: 'javafx-base', version: '11', classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-base', version: '11', classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-base', version: '11', classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-controls', version: '11', classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-controls', version: '11', classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-controls', version: '11', classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: '11', classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: '11', classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: '11', classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: '11', classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: '11', classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: '11', classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-media', version: '11', classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-media', version: '11', classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-media', version: '11', classifier: 'linux'
implementation 'com.itextpdf:itextpdf:5.5.10'
implementation 'org.bouncycastle:bcprov-jdk15on:1.56'
testImplementation 'org.testfx:testfx-core:4.0.16-alpha'
testImplementation 'org.testfx:testfx-junit5:4.0.16-alpha'
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.0'
testImplementation 'org.testfx:openjfx-monocle:jdk-11+26'
}
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
testLogging.showStandardStreams = true
testLogging {
events "passed", "skipped", "failed"
}
systemProperty 'java.awt.headless', 'true'
systemProperty 'testfx.robot', 'glass'
systemProperty 'testfx.headless', 'true'
systemProperty 'prism.order', 'sw'
systemProperty 'prism.text', 't2k'
systemProperty 'testfx.setup.timeout', '2500'
}
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': 'AlgoSenpai Adventures',
'site-githuburl': 'https://github.com/AY1920S1-CS2113T-T09-3/main',
]
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