Remove Git version logging and related plugin

Removed the `printVersion` method from `PlayerUtils.java` and eliminated the `gradle-git-properties` plugin from `build.gradle.kts`. These changes simplify the project setup by removing unnecessary Git version logging dependencies.
This commit is contained in:
Teriuihi 2024-08-04 22:37:26 +02:00
parent 9e9ada4e2b
commit 4ed83b6376
2 changed files with 0 additions and 19 deletions

View File

@ -1,7 +1,6 @@
plugins {
id("java")
id("maven-publish")
id("com.gorylenko.gradle-git-properties") version "2.3.1"
}
group = "com.alttd"
@ -16,10 +15,6 @@ java {
}
}
gitProperties {
keys = listOf("git.commit.id", "git.commit.time")
}
tasks {
withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()

View File

@ -26,20 +26,6 @@ public final class PlayerUtils extends JavaPlugin {
registerCommands();
registerEvents();
reloadConfigs();
printVersion();
}
private void printVersion() {
Properties gitProps = new Properties();
try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream("git.properties")) {
gitProps.load(inputStream);
} catch (IOException e) {
logger.severe("Unable to load git.properties, unknown version");
return;
}
logger.info("Git commit ID: %s".formatted(gitProps.getProperty("git.commit.id")));
logger.info("Git commit time: %s".formatted(gitProps.getProperty("git.commit.time")));
}
@Override