Skip to content
Snippets Groups Projects
build.gradle 2.12 KiB
Newer Older
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
plugins {
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
  id "application"
  id "java"
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
  id "com.github.johnrengelman.shadow" version "5.0.0"
  id "net.ltgt.apt-eclipse" version "0.21"
  id "eclipse-wtp"
  id "jacoco"
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
}

sourceCompatibility = 1.8
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
compileJava.options.encoding = "UTF-8"
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed

repositories {
  jcenter()
}

dependencies {
  implementation project(":nshmp-lib")

Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
  // micronaut
  annotationProcessor platform("io.micronaut:micronaut-bom:1.2.6")
  annotationProcessor "io.micronaut:micronaut-inject-java"
  annotationProcessor "io.micronaut:micronaut-validation"
  implementation platform("io.micronaut:micronaut-bom:1.2.6")
  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:2.9.0"
  runtimeOnly "ch.qos.logback:logback-classic:1.2.3"
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed

  // junit
  testAnnotationProcessor "io.micronaut:micronaut-inject-java:1.2.6"
  testImplementation platform("io.micronaut:micronaut-bom:1.2.6")
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
  testImplementation "org.junit.jupiter:junit-jupiter:5.5.2"
  testImplementation "org.junit.jupiter:junit-jupiter-api"
  testImplementation "io.micronaut.test:micronaut-test-junit5"
  testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
sourceSets {
  main {
    java {
      srcDirs = ['src/main']
    }
    resources {
      srcDirs = ['src/resources']
      exclude '**/*.java'
    }
  }
  test {
    java {
      srcDirs = ['test']
    }
    resources {
      srcDirs = ['test']
      exclude '**/*.java'
    }
  }
}

Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
test {
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
  useJUnitPlatform()

Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
  reports {
    junitXml.enabled = true
    html.enabled = true
  }
}

jacocoTestReport {
  reports {
    xml.enabled true
    html.enabled true
  }
}

check.dependsOn jacocoTestReport

Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
mainClassName = "gov.usgs.earthquake.nshmp.www.Application"

shadowJar {
  mergeServiceFiles()
}

Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
run.jvmArgs("-noverify", "-XX:TieredStopAtLevel=1", "-Dcom.sun.management.jmxremote")
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
tasks.withType(JavaCompile){
  options.encoding = "UTF-8"
Clayton, Brandon Scott's avatar
Clayton, Brandon Scott committed
  options.compilerArgs.add("-parameters")