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

Switch to download plugin

parent eed7d727
No related branches found
No related tags found
2 merge requests!162Production Release | nshmp-ws,!161Resolves - Fault Section Tags
...@@ -6,6 +6,7 @@ plugins { ...@@ -6,6 +6,7 @@ plugins {
id "com.github.spotbugs" version "${spotbugsVersion}" id "com.github.spotbugs" version "${spotbugsVersion}"
id "com.palantir.git-version" version "${gitVersionVersion}" id "com.palantir.git-version" version "${gitVersionVersion}"
id "com.star-zero.gradle.githook" version "${githooksVersion}" id "com.star-zero.gradle.githook" version "${githooksVersion}"
id "de.undercouch.download" version "${downloadVersion}"
id "eclipse-wtp" id "eclipse-wtp"
id "io.micronaut.application" version "${micronautPluginVersion}" id "io.micronaut.application" version "${micronautPluginVersion}"
id "jacoco" id "jacoco"
...@@ -24,6 +25,7 @@ java { ...@@ -24,6 +25,7 @@ java {
apply from: "${projectDir}/gradle/app-version.gradle" apply from: "${projectDir}/gradle/app-version.gradle"
apply from: "${projectDir}/gradle/dependencies.gradle" apply from: "${projectDir}/gradle/dependencies.gradle"
apply from: "${projectDir}/gradle/fault-sections.gradle"
apply from: "${projectDir}/gradle/git-hooks.gradle" apply from: "${projectDir}/gradle/git-hooks.gradle"
apply from: "${projectDir}/gradle/node.gradle" apply from: "${projectDir}/gradle/node.gradle"
apply from: "${projectDir}/gradle/repositories.gradle" apply from: "${projectDir}/gradle/repositories.gradle"
...@@ -52,6 +54,7 @@ shadowJar { ...@@ -52,6 +54,7 @@ shadowJar {
} }
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
dependsOn downloadFaultSections
options.encoding = "UTF-8" options.encoding = "UTF-8"
options.compilerArgs.add("-parameters") options.compilerArgs.add("-parameters")
} }
...@@ -60,11 +63,6 @@ tasks.withType(JavaExec) { ...@@ -60,11 +63,6 @@ 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 "libs"
}
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 {
......
downloadVersion = 5.1.0
githooksVersion = 1.2.0 githooksVersion = 1.2.0
gitVersionVersion = 0.15.0 gitVersionVersion = 0.15.0
jacksonVersion = 2.9.0 jacksonVersion = 2.9.0
......
apply plugin: "de.undercouch.download"
ext {
archiveUrl = "https://code.usgs.gov/ghsc/nshmp/nshm-fault-sections/-/archive"
faultsDir = "src/main/resources/fault-sections";
}
task downloadFaultSections() {
doLast {
// Download and unzip nshm-fault-sections tag 1.1
def zipFile1p1 = new File(faultsDir, "nshm-fault-sections-1.1.zip")
download.run {
src "${archiveUrl}/1.1/nshm-fault-sections-1.1.zip"
dest zipFile1p1
}
copy {
from zipTree(zipFile1p1)
into faultsDir
}
delete {
delete zipFile1p1
}
}
}
task faultSectionsClean(type: Delete) {
delete faultsDir
}
clean.dependsOn faultSectionsClean
plugins {
id "com.alexvasilkov.git-dependencies" version "2.0.3"
}
rootProject.name = "nshmp-ws" rootProject.name = "nshmp-ws"
git {
fetch("https://code.usgs.gov/ghsc/nshmp/nshm-fault-sections.git", {
name "fault-sections--1.1"
tag "1.1"
})
}
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