From ab8274239edcfe25c3afcf931e29f18f77010281 Mon Sep 17 00:00:00 2001 From: Fulminazzo Date: Wed, 20 Dec 2023 16:13:39 +0100 Subject: [PATCH] Added FulmiCollection dependency. Added Java 8 compatibility. Fixed Main-Class attribute in MANIFEST.MF. Created own PreventSaving annotation. Added automatic release GitHub action. Added ReflectionsUtil library (TEMPORARY). --- build.gradle | 2 +- .../it/fulminazzo/yamlparser/interfaces/IConfiguration.java | 1 + .../yamlparser/objects/configurations/FileConfiguration.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 1d2b341..7c16761 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ tasks.register('javadocJar', Jar) { jar { manifest { attributes( - "Main-Class": "${project.group}.${project.name.toLowerCase()}.${project.name}", + "Main-Class": "${project.group}.${project.name.toLowerCase()}.YAMLMain", "Manifest-Version": "${project.version}" ) } diff --git a/src/main/java/it/fulminazzo/yamlparser/interfaces/IConfiguration.java b/src/main/java/it/fulminazzo/yamlparser/interfaces/IConfiguration.java index 2df4fd8..72d2f88 100644 --- a/src/main/java/it/fulminazzo/yamlparser/interfaces/IConfiguration.java +++ b/src/main/java/it/fulminazzo/yamlparser/interfaces/IConfiguration.java @@ -897,6 +897,7 @@ default boolean check(String name, Object object, Class clazz) { * Compares this configuration with another. * * @param configuration the configuration + * @param ignore the keys to ignore during checking * @return the result of the comparison as configuration checker */ default ConfigurationChecker compare(IConfiguration configuration, String... ignore) { diff --git a/src/main/java/it/fulminazzo/yamlparser/objects/configurations/FileConfiguration.java b/src/main/java/it/fulminazzo/yamlparser/objects/configurations/FileConfiguration.java index 4c821c9..38dd64c 100644 --- a/src/main/java/it/fulminazzo/yamlparser/objects/configurations/FileConfiguration.java +++ b/src/main/java/it/fulminazzo/yamlparser/objects/configurations/FileConfiguration.java @@ -102,7 +102,7 @@ public static Yaml newYaml() { * Add all the parsers present in the package: ../yamlelements */ public static void addParsers() { - String packageName = FileConfiguration.class.getPackageName(); + String packageName = FileConfiguration.class.getPackage().getName(); String[] tmp = packageName.split("\\."); packageName = String.join(".", Arrays.copyOfRange(tmp, 0, tmp.length - 1)); addParsers(packageName + ".yamlelements");