reimplement strata

This commit is contained in:
dfsek
2021-11-28 13:09:30 -07:00
parent 2325886adb
commit 6f88519df8
3 changed files with 6 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
dependencies {
shadedApi(project(":common:api:util"))
shadedApi("ca.solo-studios:strata:1.0.0")
shadedApi("ca.solo-studios:strata:1.1.1")
}

View File

@@ -11,7 +11,5 @@ dependencies {
shadedApi("net.jafama:jafama:2.3.2")
shadedApi("org.slf4j:slf4j-api:1.7.32")
shadedApi("ca.solo-studios:strata:1.0.0")
}

View File

@@ -50,9 +50,9 @@ public class DependencySorter {
BaseAddon dependency = addons.get(id);
if(!range.isSatisfiedBy(dependency.getVersion())) {
// FIXME - Strata is currently broken.
//throw new DependencyVersionException("Addon " + addon.getID() + " specifies dependency on " + id + ", versions " + range +
// ", but non-matching version " + dependency.getVersion().getFormatted() + " is installed..");
throw new DependencyVersionException(
"Addon " + addon.getID() + " specifies dependency on " + id + ", versions " + range.getFormatted() +
", but non-matching version " + dependency.getVersion().getFormatted() + " is installed.");
}
if(!visited.get(dependency.getID())) { // if we've not visited it yet
@@ -75,6 +75,7 @@ public class DependencySorter {
checkDependencies(base, dependency);
});
}
public List<BaseAddon> sort() {
List<BaseAddon> sorted = new ArrayList<>();
@@ -88,7 +89,7 @@ public class DependencySorter {
if(!visited.get(addon.getID())) {
sortDependencies(addon, sorted);
}
if(!visited.get(addon.getID())) {
sorted.add(addon);
visited.put(addon.getID(), true);