diff --git a/build.gradle b/build.gradle
index 684942bb13d93b773bd75aa44f9fd91c2e874714..9dd53b0a2c46d6b2cec7cf056b61633a7f4f6eea 100644
--- a/build.gradle
+++ b/build.gradle
@@ -33,7 +33,7 @@ plugins {
   id "com.github.johnrengelman.shadow" version "${shadowVersion}"
   id "com.github.node-gradle.node" version "${nodePluginVersion}"
   id "com.github.spotbugs" version "${spotbugsVersion}"
-  id "com.palantir.git-version" version "${gitVersionVersion}"
+  id "com.palantir.git-version" version "${gitVersionVersion}" apply false
   id "com.star-zero.gradle.githook" version "${githooksVersion}"
   id "eclipse-wtp"
   id "io.micronaut.application" version "${micronautPluginVersion}"
diff --git a/gradle/app-version.gradle b/gradle/app-version.gradle
index f7e96ed1e21cc2211ce833d495462f485030fcaf..c0f4c3c4c23fa00d78ca1a4d5d4af2e67101f91c 100644
--- a/gradle/app-version.gradle
+++ b/gradle/app-version.gradle
@@ -1,8 +1,9 @@
-apply plugin: "com.palantir.git-version"
 
 tasks.withType(JavaCompile) {
   doFirst {
     try {
+      apply plugin: "com.palantir.git-version"
+
       def versionFile = new File("${projectDir}/src/main/resources/version/nshmp-haz-version.json")
       new File(versionFile.getParent()).mkdirs()
       def details = versionDetails()