Merge remote-tracking branch 'refs/remotes/origin/main' into owlsys/dependency-resolving
This commit is contained in:
commit
e076c98531
|
@ -23,7 +23,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.remapper){
|
implementation(libs.thyroxine){
|
||||||
isTransitive = false
|
isTransitive = false
|
||||||
}
|
}
|
||||||
compileOnly("org.apache.logging.log4j:log4j-slf4j2-impl:3.0.0-beta2")
|
compileOnly("org.apache.logging.log4j:log4j-slf4j2-impl:3.0.0-beta2")
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
remapper = "1.0.0-SNAPSHOT"
|
thyroxine = "1.0.0-SNAPSHOT"
|
||||||
nightconfig = "3.7.2"
|
nightconfig = "3.7.2"
|
||||||
mixin = "0.13.4+mixin.0.8.5"
|
mixin = "0.13.4+mixin.0.8.5"
|
||||||
annotations = "24.1.0"
|
annotations = "24.1.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|
||||||
remapper = { module = "dev.frogmc:thyroxine", version.ref = "remapper" }
|
thyroxine = { module = "dev.frogmc:thyroxine", version.ref = "thyroxine" }
|
||||||
nightconfig = { module = "com.electronwill.night-config:toml", version.ref = "nightconfig" }
|
nightconfig = { module = "com.electronwill.night-config:toml", version.ref = "nightconfig" }
|
||||||
mixin = { module = "net.fabricmc:sponge-mixin", version.ref = "mixin" }
|
mixin = { module = "net.fabricmc:sponge-mixin", version.ref = "mixin" }
|
||||||
annotations = { module = "org.jetbrains:annotations", version.ref = "annotations" }
|
annotations = { module = "org.jetbrains:annotations", version.ref = "annotations" }
|
||||||
|
|
|
@ -7,12 +7,12 @@ plugins {
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
name = "Esnesnon Maven/Snapshots"
|
name = "FrogMC Maven/Snapshots"
|
||||||
url = uri("https://maven-esnesnon.ecorous.org/snapshots")
|
url = uri("https://maven-frogmc.ecorous.org/snapshots")
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name = "Esnesnon Maven/Releases"
|
name = "FrogMC Maven/Releases"
|
||||||
url = uri("https://maven-esnesnon.ecorous.org/releases")
|
url = uri("https://maven-frogmc.ecorous.org/releases")
|
||||||
}
|
}
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ import java.util.Optional;
|
||||||
|
|
||||||
import dev.frogmc.frogloader.api.env.Env;
|
import dev.frogmc.frogloader.api.env.Env;
|
||||||
import dev.frogmc.frogloader.api.mod.ModProperties;
|
import dev.frogmc.frogloader.api.mod.ModProperties;
|
||||||
import dev.frogmc.frogloader.impl.LoaderImpl;
|
|
||||||
import dev.frogmc.frogloader.api.plugin.NonsensePlugin;
|
import dev.frogmc.frogloader.api.plugin.NonsensePlugin;
|
||||||
|
import dev.frogmc.frogloader.impl.LoaderImpl;
|
||||||
|
|
||||||
public interface Loader {
|
public interface Loader {
|
||||||
|
|
||||||
|
@ -20,11 +20,15 @@ public interface Loader {
|
||||||
Env getEnv();
|
Env getEnv();
|
||||||
|
|
||||||
Path getGameDir();
|
Path getGameDir();
|
||||||
|
|
||||||
Path getConfigDir();
|
Path getConfigDir();
|
||||||
|
|
||||||
Path getModsDir();
|
Path getModsDir();
|
||||||
|
|
||||||
boolean isDevelopment();
|
boolean isDevelopment();
|
||||||
|
|
||||||
boolean isModLoaded(String id);
|
boolean isModLoaded(String id);
|
||||||
|
|
||||||
Optional<ModProperties> getModProperties(String id);
|
Optional<ModProperties> getModProperties(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,12 +12,12 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import dev.frogmc.frogloader.api.Loader;
|
import dev.frogmc.frogloader.api.Loader;
|
||||||
|
import dev.frogmc.frogloader.api.env.Env;
|
||||||
|
import dev.frogmc.frogloader.api.mod.ModProperties;
|
||||||
import dev.frogmc.frogloader.api.plugin.NonsensePlugin;
|
import dev.frogmc.frogloader.api.plugin.NonsensePlugin;
|
||||||
import dev.frogmc.frogloader.impl.launch.MixinClassLoader;
|
import dev.frogmc.frogloader.impl.launch.MixinClassLoader;
|
||||||
import dev.frogmc.frogloader.impl.mod.ModUtil;
|
import dev.frogmc.frogloader.impl.mod.ModUtil;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import dev.frogmc.frogloader.api.env.Env;
|
|
||||||
import dev.frogmc.frogloader.api.mod.ModProperties;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.spongepowered.asm.mixin.MixinEnvironment;
|
import org.spongepowered.asm.mixin.MixinEnvironment;
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
package dev.frogmc.frogloader.impl.gui;
|
package dev.frogmc.frogloader.impl.gui;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
|
|
||||||
|
import dev.frogmc.frogloader.impl.LoaderImpl;
|
||||||
import dev.frogmc.frogloader.impl.mod.ModDependencyResolver;
|
import dev.frogmc.frogloader.impl.mod.ModDependencyResolver;
|
||||||
import dev.frogmc.frogloader.impl.mod.ModUtil;
|
import dev.frogmc.frogloader.impl.mod.ModUtil;
|
||||||
import dev.frogmc.frogloader.impl.util.URLUtil;
|
import dev.frogmc.frogloader.impl.util.URLUtil;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import dev.frogmc.frogloader.impl.LoaderImpl;
|
|
||||||
|
|
||||||
public class LoaderGui {
|
public class LoaderGui {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package dev.frogmc.frogloader.impl.launch;
|
package dev.frogmc.frogloader.impl.launch;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentSkipListSet;
|
import java.util.concurrent.ConcurrentSkipListSet;
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ import java.lang.invoke.MethodType;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import dev.frogmc.frogloader.api.env.Env;
|
import dev.frogmc.frogloader.api.env.Env;
|
||||||
import dev.frogmc.frogloader.impl.mixin.NonsenseMixinService;
|
import dev.frogmc.frogloader.impl.mixin.NonsenseMixinService;
|
||||||
|
import lombok.Getter;
|
||||||
import org.spongepowered.asm.launch.MixinBootstrap;
|
import org.spongepowered.asm.launch.MixinBootstrap;
|
||||||
import org.spongepowered.asm.service.IPropertyKey;
|
import org.spongepowered.asm.service.IPropertyKey;
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,12 @@ import org.spongepowered.asm.mixin.MixinEnvironment;
|
||||||
public class MixinClassLoader extends URLClassLoader {
|
public class MixinClassLoader extends URLClassLoader {
|
||||||
|
|
||||||
private static final ClassLoader SYSTEM = ClassLoader.getSystemClassLoader();
|
private static final ClassLoader SYSTEM = ClassLoader.getSystemClassLoader();
|
||||||
|
private final List<String> exclusions = new ArrayList<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
registerAsParallelCapable();
|
registerAsParallelCapable();
|
||||||
}
|
}
|
||||||
|
|
||||||
private final List<String> exclusions = new ArrayList<>();
|
|
||||||
|
|
||||||
public MixinClassLoader() {
|
public MixinClassLoader() {
|
||||||
super(new URL[0], null);
|
super(new URL[0], null);
|
||||||
excludePackage("java");
|
excludePackage("java");
|
||||||
|
|
|
@ -2,15 +2,18 @@ package dev.frogmc.frogloader.impl.mixin;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.util.*;
|
import java.util.Collection;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentSkipListSet;
|
import java.util.concurrent.ConcurrentSkipListSet;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import dev.frogmc.frogloader.api.mod.ModProperties;
|
||||||
import dev.frogmc.frogloader.impl.launch.AccessWidener;
|
import dev.frogmc.frogloader.impl.launch.AccessWidener;
|
||||||
import dev.frogmc.frogloader.impl.mod.BuiltinExtensions;
|
import dev.frogmc.frogloader.impl.mod.BuiltinExtensions;
|
||||||
import dev.frogmc.frogloader.api.mod.ModProperties;
|
|
||||||
|
|
||||||
public class AWProcessor {
|
public class AWProcessor {
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,12 @@ import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
import dev.frogmc.frogloader.api.mod.ModDependencies;
|
import dev.frogmc.frogloader.api.mod.ModDependencies;
|
||||||
import dev.frogmc.frogloader.api.mod.ModProperties;
|
import dev.frogmc.frogloader.api.mod.ModProperties;
|
||||||
import dev.frogmc.frogloader.api.mod.SemVer;
|
import dev.frogmc.frogloader.api.mod.SemVer;
|
||||||
import dev.frogmc.frogloader.impl.SemVerParseException;
|
import dev.frogmc.frogloader.impl.SemVerParseException;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
|
@ -13,10 +13,10 @@ import com.electronwill.nightconfig.core.CommentedConfig;
|
||||||
import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||||
import com.electronwill.nightconfig.core.file.FileNotFoundAction;
|
import com.electronwill.nightconfig.core.file.FileNotFoundAction;
|
||||||
import com.electronwill.nightconfig.toml.TomlParser;
|
import com.electronwill.nightconfig.toml.TomlParser;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import dev.frogmc.frogloader.api.mod.ModDependencies;
|
import dev.frogmc.frogloader.api.mod.ModDependencies;
|
||||||
import dev.frogmc.frogloader.api.mod.ModExtensions;
|
import dev.frogmc.frogloader.api.mod.ModExtensions;
|
||||||
import dev.frogmc.frogloader.api.mod.ModProperties;
|
import dev.frogmc.frogloader.api.mod.ModProperties;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ import java.util.function.IntSupplier;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import lombok.NonNull;
|
|
||||||
import dev.frogmc.frogloader.api.mod.SemVer;
|
import dev.frogmc.frogloader.api.mod.SemVer;
|
||||||
import dev.frogmc.frogloader.impl.SemVerParseException;
|
import dev.frogmc.frogloader.impl.SemVerParseException;
|
||||||
|
import lombok.NonNull;
|
||||||
|
|
||||||
public record SemVerImpl(int major, int minor, int patch, String prerelease, String build) implements SemVer {
|
public record SemVerImpl(int major, int minor, int patch, String prerelease, String build) implements SemVer {
|
||||||
// Adapted from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
// Adapted from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
||||||
|
|
|
@ -12,8 +12,6 @@ import java.util.*;
|
||||||
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import dev.frogmc.frogloader.api.Loader;
|
import dev.frogmc.frogloader.api.Loader;
|
||||||
import dev.frogmc.frogloader.impl.gui.LoaderGui;
|
|
||||||
import dev.frogmc.frogloader.impl.mod.*;
|
|
||||||
import dev.frogmc.frogloader.api.extensions.PreLaunchExtension;
|
import dev.frogmc.frogloader.api.extensions.PreLaunchExtension;
|
||||||
import dev.frogmc.frogloader.api.mod.ModDependencies;
|
import dev.frogmc.frogloader.api.mod.ModDependencies;
|
||||||
import dev.frogmc.frogloader.api.mod.ModExtensions;
|
import dev.frogmc.frogloader.api.mod.ModExtensions;
|
||||||
|
@ -21,9 +19,10 @@ import dev.frogmc.frogloader.api.mod.ModProperties;
|
||||||
import dev.frogmc.frogloader.api.plugin.NonsensePlugin;
|
import dev.frogmc.frogloader.api.plugin.NonsensePlugin;
|
||||||
import dev.frogmc.frogloader.impl.Discovery;
|
import dev.frogmc.frogloader.impl.Discovery;
|
||||||
import dev.frogmc.frogloader.impl.LoaderImpl;
|
import dev.frogmc.frogloader.impl.LoaderImpl;
|
||||||
|
import dev.frogmc.frogloader.impl.gui.LoaderGui;
|
||||||
import dev.frogmc.frogloader.impl.mixin.AWProcessor;
|
import dev.frogmc.frogloader.impl.mixin.AWProcessor;
|
||||||
import org.ecorous.esnesnon.nonsense.loader.impl.mod.*;
|
import dev.frogmc.frogloader.impl.mod.*;
|
||||||
import org.ecorous.esnesnon.nonsense_remapper.NonsenseRemapper;
|
import dev.frogmc.thyroxine.Thyroxine;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.spongepowered.asm.mixin.Mixins;
|
import org.spongepowered.asm.mixin.Mixins;
|
||||||
|
@ -109,7 +108,7 @@ public class Minecraft implements NonsensePlugin {
|
||||||
|
|
||||||
if (!loader.isDevelopment()) {
|
if (!loader.isDevelopment()) {
|
||||||
if (!Files.exists(remappedGamePath)) {
|
if (!Files.exists(remappedGamePath)) {
|
||||||
NonsenseRemapper.run(version, gamePath, remappedGamePath, true, false);
|
Thyroxine.run(version, gamePath, remappedGamePath, true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.frogmc.frogloader.impl.plugin.game.minecraft;
|
package dev.frogmc.frogloader.impl.plugin.game.minecraft;
|
||||||
|
|
||||||
import dev.frogmc.frogloader.impl.mod.SemVerImpl;
|
|
||||||
import dev.frogmc.frogloader.api.mod.SemVer;
|
import dev.frogmc.frogloader.api.mod.SemVer;
|
||||||
import dev.frogmc.frogloader.impl.SemVerParseException;
|
import dev.frogmc.frogloader.impl.SemVerParseException;
|
||||||
|
import dev.frogmc.frogloader.impl.mod.SemVerImpl;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class MinecraftSemVerImpl implements SemVer {
|
public class MinecraftSemVerImpl implements SemVer {
|
||||||
|
|
|
@ -3,10 +3,10 @@ format_version = "1.0.0"
|
||||||
|
|
||||||
[frog.mod]
|
[frog.mod]
|
||||||
id = "frogloader"
|
id = "frogloader"
|
||||||
name = "Nonsense Loader"
|
name = "FrogLoader"
|
||||||
version = "${version}"
|
version = "${version}"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
credits = [
|
credits = [
|
||||||
{ name = "Nonsense Team", roles = ["author"] }
|
{ name = "FrogMC Team", roles = ["author"] }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue