mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
Fix up-to-date checks for ValidateAccessWidenerTask (#565)
* Apply mitigation's against Log4J2 exploit CVE-2021-44228. * Only warn when the yarn version does not match the minecraft version. Should allow yarn versions to be used across mc versions when needed. * Fix up-to-date checks for ValidateAccessWidenerTask Co-authored-by: modmuss50 <modmuss50@gmail.com>
This commit is contained in:
@@ -60,6 +60,7 @@ public class LaunchProvider extends DependencyProvider {
|
||||
.property("fabric.development", "true")
|
||||
.property("fabric.remapClasspathFile", getRemapClasspathFile().getAbsolutePath())
|
||||
.property("log4j.configurationFile", getAllLog4JConfigFiles())
|
||||
.property("log4j2.formatMsgNoLookups", "true")
|
||||
|
||||
.property("client", "java.library.path", nativesPath)
|
||||
.property("client", "org.lwjgl.librarypath", nativesPath)
|
||||
|
||||
@@ -196,7 +196,7 @@ public class MappingsProviderImpl extends DependencyProvider implements Mappings
|
||||
String yarnMinecraftVersion = yarnVersion.substring(0, yarnVersion.lastIndexOf(separator));
|
||||
|
||||
if (!yarnMinecraftVersion.equalsIgnoreCase(minecraftVersion)) {
|
||||
throw new RuntimeException(String.format("Minecraft Version (%s) does not match yarn's minecraft version (%s)", minecraftVersion, yarnMinecraftVersion));
|
||||
getProject().getLogger().warn("Minecraft Version ({}) does not match yarn's minecraft version ({})", minecraftVersion, yarnMinecraftVersion);
|
||||
}
|
||||
|
||||
// We can save reading the zip file + header by checking the file name
|
||||
|
||||
@@ -59,6 +59,9 @@ public abstract class ValidateAccessWidenerTask extends DefaultTask {
|
||||
|
||||
getAccessWidener().convention(extension.getAccessWidenerPath()).finalizeValueOnRead();
|
||||
getTargetJar().convention(getProject().getObjects().fileProperty().fileValue(extension.getMinecraftMappedProvider().getMappedJar())).finalizeValueOnRead();
|
||||
|
||||
// Ignore outputs for up-to-date checks as there aren't any (so only inputs are checked)
|
||||
getOutputs().upToDateWhen(task -> true);
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
|
||||
Reference in New Issue
Block a user