diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java index c46a35f5..658edd0b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java @@ -27,6 +27,21 @@ public OptionalView(OptionalView view) { this.all = view.all; } + public OptionalView(ClientProfile profile, OptionalView old) { + this(profile); + for(OptionalFile oldFile : old.all) { + OptionalFile newFile = findByName(oldFile.name); + if(newFile == null) { + continue; + } + if(old.isEnabled(oldFile)) { + enable(newFile, old.installInfo.get(oldFile).isManual, (file, status) -> {}); + } else { + disable(newFile, (file, status) -> {}); + } + } + } + @SuppressWarnings("unchecked") public Set getActionsByClass(Class clazz) { Set results = new HashSet<>(); @@ -42,6 +57,19 @@ public Set getActionsByClass(Class clazz) { return results; } + public OptionalFile findByName(String name) { + for(OptionalFile file : all) { + if(name.equals(file.name)) { + return file; + } + } + return null; + } + + public boolean isEnabled(OptionalFile file) { + return enabled.contains(file); + } + public Set getEnabledActions() { Set results = new HashSet<>(); for (OptionalFile e : enabled) { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index 34cf7597..83cdc0fb 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -6,9 +6,9 @@ public final class Version implements Comparable { public static final int MAJOR = 5; public static final int MINOR = 3; - public static final int PATCH = 5; + public static final int PATCH = 6; public static final int BUILD = 1; - public static final Version.Type RELEASE = Type.STABLE; + public static final Version.Type RELEASE = Type.DEV; public final int major; public final int minor; public final int patch; diff --git a/ServerWrapper/build.gradle b/ServerWrapper/build.gradle index dc8c5dba..b481f010 100644 --- a/ServerWrapper/build.gradle +++ b/ServerWrapper/build.gradle @@ -64,7 +64,7 @@ pack project(':LauncherAPI') shadowJar { duplicatesStrategy = 'EXCLUDE' - classifier = null + archiveClassifier = null relocate 'io.netty', 'pro.gravit.repackage.io.netty' configurations = [project.configurations.pack] exclude 'module-info.class' diff --git a/build.gradle b/build.gradle index b44eadef..dd458e1f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,11 @@ plugins { - id 'com.github.johnrengelman.shadow' version '5.2.0' apply false + id 'com.github.johnrengelman.shadow' version '7.1.2' apply false id 'maven-publish' id 'signing' id 'org.openjfx.javafxplugin' version '0.0.10' apply false } group = 'pro.gravit.launcher' -version = '5.3.5' +version = '5.3.6-SNAPSHOT' apply from: 'props.gradle'