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

use GitLab Maven

parent a1114287
No related branches found
No related tags found
1 merge request!74Maven
...@@ -7,6 +7,7 @@ plugins { ...@@ -7,6 +7,7 @@ plugins {
id "eclipse-wtp" id "eclipse-wtp"
id "jacoco" id "jacoco"
id "java" id "java"
id "maven-publish"
id "net.ltgt.apt-eclipse" version "${aptEclipseVersion}" id "net.ltgt.apt-eclipse" version "${aptEclipseVersion}"
} }
...@@ -15,60 +16,20 @@ compileJava.options.encoding = "UTF-8" ...@@ -15,60 +16,20 @@ compileJava.options.encoding = "UTF-8"
mainClassName = "gov.usgs.earthquake.nshmp.www.Application" mainClassName = "gov.usgs.earthquake.nshmp.www.Application"
repositories { configurations {
jcenter() nshmp
} }
// 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"
// })
// }
ext { ext {
// nshmpLib = "libs/nshmp-ws-dep--nshmp-lib" libsDir = "libs"
nshmpLib = "../nshmp-lib" nshmpLib = "${libsDir}/nshmp-lib-artifacts"
nshmpLibGradleDir = "${nshmpLib}/gradle" nshmpLibGradleDir = "${nshmpLib}/gradle"
spotbugsDir = "${nshmpLib}/gradle" spotbugsDir = "${nshmpLib}/gradle"
spotlessDir = "${nshmpLib}/src/main/resources" spotlessDir = "${nshmpLib}/src/main/resources"
} }
apply from: "${nshmpLibGradleDir}/git-hooks.gradle" apply from: "${projectDir}/gradle/repositories.gradle"
apply from: "${nshmpLibGradleDir}/spotbugs.gradle" apply from: "${projectDir}/gradle/dependencies.gradle"
apply from: "${nshmpLibGradleDir}/spotless.gradle"
dependencies {
// TODO remove once nshmp-lib is stable
implementation project(":nshmp-lib")
// 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 "ch.qos.logback:logback-classic:${logbackVersion}"
// Swagger
annotationProcessor("io.micronaut.configuration:micronaut-openapi:${mnOpenAPIVersion}")
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 { test {
useJUnitPlatform() useJUnitPlatform()
...@@ -100,6 +61,12 @@ tasks.withType(JavaExec) { ...@@ -100,6 +61,12 @@ tasks.withType(JavaExec) {
jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote') jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
} }
task libsClean(type: Delete) {
delete libsDir
}
clean.dependsOn libsClean
/* Add HTML reports to SpotBugs */ /* Add HTML reports to SpotBugs */
tasks.withType(com.github.spotbugs.snom.SpotBugsTask) { tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
reports { reports {
...@@ -109,3 +76,15 @@ tasks.withType(com.github.spotbugs.snom.SpotBugsTask) { ...@@ -109,3 +76,15 @@ tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
} }
} }
} }
gradle.afterProject {
copy {
from {
configurations.nshmp.collect { zipTree(it) }
}
into nshmpLib
}
apply from: "${nshmpLibGradleDir}/spotbugs.gradle"
apply from: "${nshmpLibGradleDir}/git-hooks.gradle"
apply from: "${nshmpLibGradleDir}/spotless.gradle"
}
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