Begin 0.11 development

This commit is contained in:
FalsePattern committed 2023-01-14 20:18:48 +01:00
1 parent 4cbda7a568
commit 1c2c3f0cf1
25 files changed
+617 -231

No files matched your search

@@ -56,7 +56,7 @@ public class ComplexVersion extends Version {
}
} else if (o instanceof SemanticVersion) {
val other = (SemanticVersion) o;
val result = other.compareTo(versions[0]);
val result = versions[0].compareTo(other);
if (result != 0) {
return result;
}
@@ -28,6 +28,13 @@ import lombok.NonNull;
import java.util.concurrent.CompletableFuture;
/**
* DEPRECATED. See the DEPENDENCIES.MD files in the root of the resources for more information.
* <p>
* This class will stay here for legacy compatibility
*/
@Deprecated
@DeprecationDetails(deprecatedSince = "0.11.0")
@StableAPI(since = "0.6.0")
public class DependencyLoader {
@@ -64,8 +71,9 @@ public class DependencyLoader {
return new VoidBuilder();
}
@StableAPI(since = "0.6.0")
@Deprecated
@DeprecationDetails(deprecatedSince = "0.10.0")
@StableAPI(since = "0.6.0")
public static class VoidBuilder {
private String loadingModId;
private String groupId;
@@ -21,9 +21,12 @@
package com.falsepattern.lib.dependencies;
import com.falsepattern.lib.DeprecationDetails;
import com.falsepattern.lib.StableAPI;
import lombok.NonNull;
@Deprecated
@DeprecationDetails(deprecatedSince = "0.11.0")
@StableAPI(since = "0.10.0")
public class Library {
@StableAPI.Expose
@@ -0,0 +1,43 @@
/*
* Copyright (C) 2022 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the word "SNEED"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.lib.dependencies;
import org.jetbrains.annotations.NotNull;
public class RawVersion extends Version {
public final String versionString;
public RawVersion(String versionString) {
this.versionString = versionString;
}
@Override
public int compareTo(@NotNull Version o) {
if (o instanceof RawVersion) {
return versionString.compareTo(((RawVersion) o).versionString);
} else if (o instanceof SemanticVersion) {
return 1;
} else if (o instanceof ComplexVersion) {
return 1;
} else {
throw new IllegalArgumentException("Unknown version type: " + o.getClass().getName());
}
}
}