From 300ed256efec17674dba08fa08e94a75e579792e Mon Sep 17 00:00:00 2001 From: Norbert Dejlich Date: Sat, 22 Jun 2024 21:30:15 +0200 Subject: [PATCH] GH-792 Fix updating of libraries. (dependency loader) (#798) * Fix updating of libraries. (dependency loader) * Update eternalcore-plugin/src/main/java/com/eternalcode/core/loader/dependency/Dependency.java Co-authored-by: Jakubk15 <77227023+Jakubk15@users.noreply.github.com> * Update eternalcore-plugin/src/main/java/com/eternalcode/core/loader/dependency/Dependency.java Co-authored-by: Jakubk15 <77227023+Jakubk15@users.noreply.github.com> --------- Co-authored-by: Martin Sulikowski Co-authored-by: Jakubk15 <77227023+Jakubk15@users.noreply.github.com> --- .../core/loader/dependency/Dependency.java | 82 ++++++++++++++++--- .../dependency/DependencyCollector.java | 26 ++++-- .../dependency/DependencyLoadResult.java | 4 +- .../dependency/DependencyLoaderImpl.java | 2 + 4 files changed, 95 insertions(+), 19 deletions(-) diff --git a/eternalcore-plugin/src/main/java/com/eternalcode/core/loader/dependency/Dependency.java b/eternalcore-plugin/src/main/java/com/eternalcode/core/loader/dependency/Dependency.java index bfffa0189..66b63ff91 100644 --- a/eternalcore-plugin/src/main/java/com/eternalcode/core/loader/dependency/Dependency.java +++ b/eternalcore-plugin/src/main/java/com/eternalcode/core/loader/dependency/Dependency.java @@ -4,9 +4,13 @@ import com.eternalcode.core.loader.resource.ResourceLocator; import java.util.Objects; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class Dependency { + private static final Pattern VERSION_PATTERN = Pattern.compile("(?[0-9]+)\\.(?[0-9]+)\\.?(?[0-9]?)(-(?