From 2d63b147621e2f60865c5272d223f9f33a268933 Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Wed, 29 Jun 2022 09:15:18 -0600
Subject: [PATCH] add download plugin

---
 build.gradle      | 8 +++-----
 gradle.properties | 1 +
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/build.gradle b/build.gradle
index c3b7e91b1..5110420ec 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,6 +6,7 @@ plugins {
   id "com.github.spotbugs" version "${spotbugsVersion}"
   id "com.palantir.git-version" version "${gitVersionVersion}" apply false
   id "com.star-zero.gradle.githook" version "${githooksVersion}"
+  id "de.undercouch.download" version "${downloadVersion}"
   id "eclipse-wtp"
   id "jacoco"
   id "maven-publish"
@@ -17,6 +18,7 @@ apply from: "${projectDir}/gradle/ext.gradle"
 apply from: "${projectDir}/gradle/jar.gradle"
 apply from: "${projectDir}/gradle/git-hooks.gradle"
 apply from: "${projectDir}/gradle/node.gradle"
+apply from: "${projectDir}/gradle/nshm.gradle"
 apply from: "${projectDir}/gradle/repositories.gradle"
 apply from: "${projectDir}/gradle/spotbugs.gradle"
 apply from: "${projectDir}/gradle/spotless.gradle"
@@ -52,6 +54,7 @@ tasks.withType(JavaCompile) {
 }
 
 tasks.withType(JavaExec) {
+  dependsOn downloadNshms
   jvmArgs(
       '-noverify',
       '-Xms2g',
@@ -71,11 +74,6 @@ tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
   }
 }
 
-task libsClean(type: Delete) {
-  delete libsDir
-}
-clean.dependsOn libsClean
-
 test {
   useJUnitPlatform()
 
diff --git a/gradle.properties b/gradle.properties
index 3f4883535..789fef826 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -2,6 +2,7 @@ awsEc2Version = 1.11.619
 awsLambdaCoreVersion = 1.1.0
 awsLambdaVersion = 1.11.461
 awsS3Version = 1.11.579
+downloadVersion = 5.1.0
 githooksVersion = 1.2.0
 gitVersionVersion = 0.15.0
 jacksonVersion = 2.9.0
-- 
GitLab