-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathbuild.gradle
More file actions
126 lines (108 loc) · 3.87 KB
/
Copy pathbuild.gradle
File metadata and controls
126 lines (108 loc) · 3.87 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
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
/*
* Build configuration for the Quality Tools for BlueJ product.
* Version: 2019.12.16
*/
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'jacoco'
id 'checkstyle'
}
compileJava {
// Establish compatibility with JDK used to build BlueJ
options.compilerArgs.addAll(['--release', '11'])
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
test {
useJUnitPlatform {
includeEngines 'junit-jupiter'
excludeEngines 'junit-vintage'
}
}
// Runs jaCoCoTestReport after test is run
test.finalizedBy jacocoTestReport
dependencies {
// These dependencies are exported to consumers; found on their compile classpaths.
// api 'org.apache.commons:commons-math3:3.6.1'
// These add all bundled dependencies.
compile fileTree(dir: 'src/lib', include: '*.jar')
// These dependencies are used internally; not exposed on consumers' compile classpaths.
// implementation 'com.google.guava:guava:28.0-jre'
// JUnit 5 = JUnit Platform + JUnit Jupiter
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
}
// Configures JaCoCo version and where reports are stored
jacoco {
toolVersion = "0.8.5"
reportsDir = file("${buildDir}/reports/jacoco")
}
jacocoTestReport {
// Generates html report in build directory
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/reports/jacoco")
}
}
jar {
manifest {
attributes "Main-Class": "edu.msudenver.bluejext.qualitytools.QualityToolsExtension"
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
/* Move development jar to production. */
task dist(type: Copy) {
description 'Copy development jar to production (build if needed)'
group 'Production'
dependsOn tasks.named("jar")
from ('build/libs')
into "${project.projectDir}"
include 'QualityTools*.jar'
rename 'QualityTools(.*).jar', 'QualityTools.jar'
}
javadoc {
description 'Generates public API javadocs'
options.addBooleanOption('author', true)
options.addBooleanOption('version', true)
options.addStringOption('bottom',
"<a rel='license' href='http://creativecommons.org/licenses/by-sa/4.0/'>"
+ "<img alt='Creative Commons License' style='border-width:0' "
+ "src='https://i.creativecommons.org/l/by-sa/4.0/88x31.png' /></a><br />"
+ "This work is licensed under a "
+ "<a rel='license' href='http://creativecommons.org/licenses/by-sa/4.0/'>"
+ "Creative Commons Attribution-ShareAlike 4.0 International License</a>.")
}
task doc(type: Javadoc) {
group 'Documentation'
description 'Generates maintenance-level javadocs'
source = sourceSets.main.allJava
classpath = configurations.compile
options.memberLevel = JavadocMemberLevel.PRIVATE
options.addBooleanOption('author', true)
options.addBooleanOption('version', true)
options.addStringOption('bottom',
"<a rel='license' href='http://creativecommons.org/licenses/by-sa/4.0/'>"
+ "<img alt='Creative Commons License' style='border-width:0' "
+ "src='https://i.creativecommons.org/l/by-sa/4.0/88x31.png' /></a><br />"
+ "This work is licensed under a "
+ "<a rel='license' href='http://creativecommons.org/licenses/by-sa/4.0/'>"
+ "Creative Commons Attribution-ShareAlike 4.0 International License</a>.")
}
task checkstyle(type: Checkstyle, dependsOn: ['checkstyleMain', 'checkstyleTest']) {
group 'Verification'
description 'Generates reports from Checkstyle.'
}
tasks.withType(Checkstyle) {
ignoreFailures = true
reports {
xml.enabled false
html.enabled true
}
}