Skip to content
Snippets Groups Projects
Commit 98d7a343 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

add micronaut and swagger

parent fcc6ad8a
No related branches found
No related tags found
1 merge request!6Micronaut Service
plugins {
id "application"
id "eclipse-wtp"
id "java"
id "jacoco"
id "com.github.johnrengelman.shadow" version "5.2.0"
id "net.ltgt.apt-eclipse" version "0.21"
id "com.star-zero.gradle.githook" version "1.2.0"
id "com.github.spotbugs" version "3.0.0"
id "com.diffplug.gradle.spotless" version "3.27.1"
......@@ -14,9 +17,7 @@ apply from: project(":nshmp-lib").file("gradle/spotless.gradle")
sourceCompatibility = JavaVersion.VERSION_11
compileJava.options.encoding = "UTF-8"
jacoco {
toolVersion = "0.8.4"
}
mainClassName = "gov.usgs.earthquake.nshmp.netcdf.www.Application"
repositories {
jcenter()
......@@ -28,15 +29,48 @@ repositories {
dependencies {
implementation project(":nshmp-lib")
implementation "edu.ucar:cdm:5.1.0"
implementation "edu.ucar:netcdf4:5.1.0"
implementation "org.slf4j:slf4j-jdk14:1.7.30"
// NetCDF
implementation "edu.ucar:cdm:${cdmVersion}"
implementation "edu.ucar:netcdf4:${netcdfVersion}"
implementation "org.slf4j:slf4j-jdk14:${slfVersion}"
// micronaut
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 "io.micronaut:micronaut-runtime-osx"
runtimeOnly "ch.qos.logback:logback-classic:${logbackVersion}"
// Swagger
annotationProcessor("io.micronaut.configuration:micronaut-openapi:${swaggerVersion}")
implementation("io.swagger.core.v3:swagger-annotations:${swaggerVersion}")
// junit
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"
}
test {
useJUnitPlatform()
}
jacoco {
toolVersion = "0.8.4"
}
jacocoTestReport {
reports {
xml.enabled true
......@@ -45,6 +79,23 @@ jacocoTestReport {
}
check.dependsOn jacocoTestReport
shadowJar {
mergeServiceFiles()
}
tasks.withType(JavaCompile) {
options.fork = true
options.forkOptions.jvmArgs << "-Dmicronaut.openapi.views.spec=" +
"swagger-ui.enabled=true," +
"swagger-ui.layout=BaseLayout"
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
tasks.withType(JavaExec) {
jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
}
/* Add HTML reports to SpotBugs */
tasks.withType(com.github.spotbugs.SpotBugsTask) {
ignoreFailures = false // TODO remove when nshmp-lib is updated
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment