Newer
Older
id "com.diffplug.spotless" version "${spotlessVersion}"
id "com.github.johnrengelman.shadow" version "${shadowVersion}"
id "com.github.node-gradle.node" version "${nodeVersion}"
id "com.github.spotbugs" version "${spotbugsVersion}"
id "com.star-zero.gradle.githook" version "${githooksVersion}"
id "io.micronaut.application" version "${mnPluginVersion}"
mainClassName = "gov.usgs.earthquake.nshmp.www.Application"
libsDir = "libs"
nshmpLib = "${libsDir}/nshmp-lib-artifacts"
nshmpLibGradleDir = "${nshmpLib}/gradle"
spotbugsDir = "${nshmpLib}/gradle"
spotlessDir = "${nshmpLib}/src/main/resources"
}
apply from: "${projectDir}/gradle/repositories.gradle"
apply from: "${projectDir}/gradle/dependencies.gradle"
reports {
junitXml.enabled = true
html.enabled = true
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
check.dependsOn jacocoTestReport
tasks.withType(JavaExec) {
jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
}
task libsClean(type: Delete) {
delete libsDir
}
clean.dependsOn libsClean
tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
html {
enabled true
stylesheet = 'fancy-hist.xsl'
}
gradle.afterProject {
copy {
from {
configurations.nshmp.collect { zipTree(it) }
}
into nshmpLib
}
apply from: "${nshmpLibGradleDir}/git-hooks.gradle"
apply from: "${nshmpLibGradleDir}/spotbugs.gradle"
apply from: "${nshmpLibGradleDir}/spotless.gradle"