From 516e9fbaaae868488fcd014ff4a2903b23256a7f Mon Sep 17 00:00:00 2001 From: Cyborger1 <45152844+Cyborger1@users.noreply.github.com> Date: Mon, 29 Aug 2022 03:12:47 -0400 Subject: [PATCH] Change version file name to avoid collisions --- build.gradle | 2 +- src/main/java/com/botdetector/BotDetectorPlugin.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index d1e01d4d..2c2b7d2c 100644 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ tasks.withType(JavaCompile) { // https://github.com/dillydill123/inventory-setups/blob/2643da8f1952e30be554d0d601397daced9c3120/build.gradle#L39 task createProperties(dependsOn: processResources) { doLast { - new File("$buildDir/resources/main/version.txt").text = "version=$project.version" + new File("$buildDir/resources/main/botdetector_version.txt").text = "version=$project.version" } } diff --git a/src/main/java/com/botdetector/BotDetectorPlugin.java b/src/main/java/com/botdetector/BotDetectorPlugin.java index b0887b45..d0345e34 100644 --- a/src/main/java/com/botdetector/BotDetectorPlugin.java +++ b/src/main/java/com/botdetector/BotDetectorPlugin.java @@ -309,7 +309,7 @@ protected void startUp() try { final Properties props = new Properties(); - props.load(BotDetectorPlugin.class.getResourceAsStream("/version.txt")); + props.load(BotDetectorPlugin.class.getResourceAsStream("/botdetector_version.txt")); detectorClient.setPluginVersion(props.getProperty("version")); } catch (Exception e)