Newer
Older
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
apply plugin: "com.star-zero.gradle.githook"
apply plugin: "com.github.spotbugs"
apply plugin: "com.diffplug.gradle.spotless"
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
tasks.withType(JavaExec) {
jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
}
task nshmpLibArtifacts(type: Copy) {
from {
configurations.nshmp.collect { zipTree(it) }
}
into nshmpLib
}
/* SpotBugs */
tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
dependsOn nshmpLibArtifacts
reports {
html {
enabled true
stylesheet = 'fancy-hist.xsl'
}
}
}
/* Spotless */
tasks.withType(com.diffplug.gradle.spotless.SpotlessExtension) {
dependsOn nshmpLibArtifacts
}
/* Githook */
tasks.withType(com.star_zero.gradle.githook.GithookExtension) {
dependsOn nshmpLibArtifacts
}
/* Run UpdateSwagger */
task swagger(type: JavaExec) {
doFirst {
mkdir swaggerDir
}
classpath sourceSets.main.runtimeClasspath
main = "gov.usgs.earthquake.nshmp.netcdf.swagger.UpdateSwagger"
}
task swaggerClean(type: Delete) {
delete swaggerDir
}
task libsClean(type: Delete) {
delete libsDir
}