Newer
Older
id "com.diffplug.gradle.spotless" version "${spotlessVersion}"
id "com.github.johnrengelman.shadow" version "5.2.0"
id "com.github.spotbugs" version "${spotbugsVersion}"
id "com.star-zero.gradle.githook" version "${githooksVersion}"
mainClassName = "gov.usgs.earthquake.nshmp.www.Application"
// TODO uncomment once nshmp-lib is stable
// git {
// implementation("https://code.usgs.gov/ghsc/nshmp/nshmp-lib.git", {
// name "nshmp-ws-dep--nshmp-lib"
// tag "v0.0.5"
// })
// }
// nshmpLib = "libs/nshmp-ws-dep--nshmp-lib"
nshmpLib = "../nshmp-lib"
nshmpLibGradleDir = "${nshmpLib}/gradle"
spotbugsDir = "${nshmpLib}/gradle"
spotlessDir = "${nshmpLib}/src/main/resources"
}
apply from: "${nshmpLibGradleDir}/git-hooks.gradle"
apply from: "${nshmpLibGradleDir}/spotbugs.gradle"
apply from: "${nshmpLibGradleDir}/spotless.gradle"
dependencies {
// TODO remove once nshmp-lib is stable
implementation project(":nshmp-lib")
annotationProcessor platform("io.micronaut:micronaut-bom:${mnVersion}")
annotationProcessor "io.micronaut:micronaut-inject-java"
annotationProcessor "io.micronaut:micronaut-validation"
implementation platform("io.micronaut:micronaut-bom:${mnVersion}")
implementation "io.micronaut:micronaut-http-client"
implementation "io.micronaut:micronaut-inject"
implementation "io.micronaut:micronaut-validation"
implementation "io.micronaut:micronaut-runtime"
implementation "io.micronaut:micronaut-http-server-netty"
implementation "com.fasterxml.jackson.module:jackson-module-parameter-names:${jacksonVersion}"
runtimeOnly "ch.qos.logback:logback-classic:${logbackVersion}"
annotationProcessor("io.micronaut.configuration:micronaut-openapi:${mnOpenAPIVersion}")
implementation("io.swagger.core.v3:swagger-annotations:${swaggerVersion}")
testAnnotationProcessor "io.micronaut:micronaut-inject-java:${mnVersion}"
testImplementation platform("io.micronaut:micronaut-bom:${mnVersion}")
testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "io.micronaut.test:micronaut-test-junit5"
testImplementation "io.micronaut.test:micronaut-test-spock"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
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')
}
tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
html {
enabled true
stylesheet = 'fancy-hist.xsl'
}