Skip to content

Commit

Permalink
Update to Loom 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGlitch76 committed Sep 30, 2023
1 parent 4f7bccd commit bf0261e
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 90 deletions.
2 changes: 1 addition & 1 deletion fabric-loom
Submodule fabric-loom updated 67 files
+3 −3 .github/workflows/test-push.yml
+3 −1 .gitignore
+4 −2 bootstrap/build.gradle
+1 −1 bootstrap/src/main/java/net/fabricmc/loom/bootstrap/LoomGradlePluginBootstrap.java
+109 −38 build.gradle
+48 −2 gradle/libs.versions.toml
+25 −0 gradle/runtime.libs.versions.toml
+23 −0 gradle/test.libs.versions.toml
+85 −0 gradle/versions.gradle
+ gradle/wrapper/gradle-wrapper.jar
+2 −1 gradle/wrapper/gradle-wrapper.properties
+6 −2 gradlew
+11 −0 settings.gradle
+1 −2 src/decompilers/cfr/net/fabricmc/loom/decompilers/cfr/CFRObfuscationMapping.java
+6 −10 src/decompilers/cfr/net/fabricmc/loom/decompilers/cfr/CFRSinkFactory.java
+12 −11 src/decompilers/cfr/net/fabricmc/loom/decompilers/cfr/LoomCFRDecompiler.java
+61 −0 src/decompilers/common/net/fabricmc/loom/decompilers/LoomInternalDecompiler.java
+86 −0 src/decompilers/fernflower/net/fabricmc/loom/decompilers/fernflower/FabricFernFlowerDecompiler.java
+3 −3 src/decompilers/fernflower/net/fabricmc/loom/decompilers/fernflower/FernflowerLogger.java
+0 −0 src/decompilers/fernflower/net/fabricmc/loom/decompilers/fernflower/ThreadSafeResultSaver.java
+8 −7 src/decompilers/fernflower/net/fabricmc/loom/decompilers/fernflower/TinyJavadocProvider.java
+172 −0 src/decompilers/vineflower/net/fabricmc/loom/decompilers/vineflower/ThreadSafeResultSaver.java
+188 −0 src/decompilers/vineflower/net/fabricmc/loom/decompilers/vineflower/TinyJavadocProvider.java
+14 −12 src/decompilers/vineflower/net/fabricmc/loom/decompilers/vineflower/VineflowerDecompiler.java
+87 −0 src/decompilers/vineflower/net/fabricmc/loom/decompilers/vineflower/VineflowerLogger.java
+1 −1 src/main/java/net/fabricmc/loom/LoomGradlePlugin.java
+3 −0 src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java
+2 −1 src/main/java/net/fabricmc/loom/build/mixin/AnnotationProcessorInvoker.java
+52 −22 src/main/java/net/fabricmc/loom/configuration/FabricApiExtension.java
+51 −18 src/main/java/net/fabricmc/loom/configuration/InstallerData.java
+5 −4 src/main/java/net/fabricmc/loom/configuration/LoomConfigurations.java
+1 −0 src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
+10 −34 src/main/java/net/fabricmc/loom/configuration/processors/MinecraftJarProcessorManager.java
+19 −2 src/main/java/net/fabricmc/loom/configuration/processors/ModJavadocProcessor.java
+2 −2 ...t/fabricmc/loom/configuration/providers/minecraft/library/processors/LoomNativeSupportLibraryProcessor.java
+3 −12 src/main/java/net/fabricmc/loom/configuration/providers/minecraft/mapped/ProcessedNamedMinecraftProvider.java
+125 −5 src/main/java/net/fabricmc/loom/decompilers/DecompilerConfiguration.java
+14 −0 src/main/java/net/fabricmc/loom/extension/LoomGradleExtensionApiImpl.java
+10 −17 src/main/java/net/fabricmc/loom/kotlin/remapping/KotlinClassMetadataWrapper.java
+19 −2 src/main/java/net/fabricmc/loom/task/AbstractRemapJarTask.java
+2 −0 src/main/java/net/fabricmc/loom/task/RemapJarTask.java
+1 −0 src/main/java/net/fabricmc/loom/task/RemapSourcesJarTask.java
+2 −1 src/main/java/net/fabricmc/loom/task/service/JarManifestService.java
+6 −3 src/main/java/net/fabricmc/loom/task/service/TinyRemapperService.java
+10 −0 src/main/java/net/fabricmc/loom/util/Checksum.java
+0 −28 src/main/java/net/fabricmc/loom/util/Constants.java
+1 −1 src/main/java/net/fabricmc/loom/util/SourceRemapper.java
+1 −0 src/main/java/net/fabricmc/loom/util/TinyRemapperHelper.java
+28 −9 src/main/java/net/fabricmc/loom/util/ZipReprocessorUtil.java
+87 −45 src/main/java/net/fabricmc/loom/util/download/Download.java
+5 −0 src/main/java/net/fabricmc/loom/util/download/DownloadBuilder.java
+17 −0 src/main/java/net/fabricmc/loom/util/download/DownloadException.java
+10 −9 src/main/kotlin/net/fabricmc/loom/kotlin/remapping/KotlinClassMetadataRemappingAnnotationVisitor.kt
+6 −6 src/main/kotlin/net/fabricmc/loom/kotlin/remapping/KotlinClassRemapper.kt
+2 −0 src/main/resources/log4j2.fabric.xml
+1 −1 src/test/groovy/net/fabricmc/loom/test/LoomTestConstants.groovy
+1 −0 src/test/groovy/net/fabricmc/loom/test/integration/DecompileTest.groovy
+4 −4 src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy
+6 −6 src/test/groovy/net/fabricmc/loom/test/integration/ReproducibleBuildTest.groovy
+69 −0 src/test/groovy/net/fabricmc/loom/test/unit/FabricApiExtensionTest.groovy
+17 −1 src/test/groovy/net/fabricmc/loom/test/unit/ZipUtilsTest.groovy
+20 −3 src/test/groovy/net/fabricmc/loom/test/unit/download/DownloadFileTest.groovy
+38 −2 src/test/groovy/net/fabricmc/loom/test/unit/download/DownloadStringTest.groovy
+11 −20 src/test/groovy/net/fabricmc/loom/test/unit/processor/MinecraftJarProcessorManagerTest.groovy
+15 −1 src/test/groovy/net/fabricmc/loom/test/util/GradleProjectTestTrait.groovy
+23 −2 src/test/groovy/net/fabricmc/loom/test/util/GradleTestUtil.groovy
+3 −2 src/test/groovy/net/fabricmc/loom/test/util/ServerRunner.groovy
86 changes: 28 additions & 58 deletions patches/0001-Initial-Quiltification.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,19 @@ This includes:
- Adding Vineflower and using it by default

diff --git a/build.gradle b/build.gradle
index c7ff152af65d5e2724df765f3539de2df0a1d519..33d81ac54db205b54b5858c11cf3f30f09222df5 100644
index 014f8da9a6d07b509d938de7c6090c1b3b8de573..6df36c1184b3ee5581c68bb46d3004adc308b1ef 100644
--- a/build.gradle
+++ b/build.gradle
@@ -23,7 +23,7 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
@@ -49,7 +49,7 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
}
}

-group = 'net.fabricmc'
+group = 'org.quiltmc'
archivesBaseName = project.name
def baseVersion = '1.3'
def baseVersion = '1.4'

@@ -45,6 +45,11 @@ repositories {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
+ maven {
+ name = "Quilt"
+ url = "https://maven.quiltmc.org/repository/release"
+ }
+ gradlePluginPortal()
mavenCentral()
}

@@ -108,6 +113,11 @@ dependencies {
// Kapt integration
compileOnly libs.kotlin.gradle.plugin

+ // Plugins we apply
+ implementation('io.github.juuxel:loom-vineflower:1.11.0') {
+ exclude group: 'net.fabricmc', module: 'fabric-loom'
+ }
+
// Testing
testImplementation(gradleTestKit())
testImplementation('org.spockframework:spock-core:2.3-groovy-3.0') {
@@ -184,10 +194,16 @@ codenarc {
def ENV = System.getenv()
@@ -251,10 +251,16 @@ codenarc {

gradlePlugin {
plugins {
Expand All @@ -68,7 +44,7 @@ index c7ff152af65d5e2724df765f3539de2df0a1d519..33d81ac54db205b54b5858c11cf3f30f
}
}

@@ -242,8 +258,8 @@ publishing {
@@ -311,8 +317,8 @@ publishing {

// Manually crate the plugin marker for snapshot versions
snapshotPlugin(MavenPublication) { publication ->
Expand All @@ -79,7 +55,7 @@ index c7ff152af65d5e2724df765f3539de2df0a1d519..33d81ac54db205b54b5858c11cf3f30f
version baseVersion + '-SNAPSHOT'

pom.withXml({
@@ -253,9 +269,9 @@ publishing {
@@ -322,9 +328,9 @@ publishing {
Node dependencies = root.appendChild(document.createElement('dependencies'))
Node dependency = dependencies.appendChild(document.createElement('dependency'))
Node groupId = dependency.appendChild(document.createElement('groupId'))
Expand All @@ -91,15 +67,15 @@ index c7ff152af65d5e2724df765f3539de2df0a1d519..33d81ac54db205b54b5858c11cf3f30f
Node version = dependency.appendChild(document.createElement('version'))
version.setTextContent(baseVersion + '-SNAPSHOT')
})
@@ -263,6 +279,7 @@ publishing {
@@ -332,6 +338,7 @@ publishing {
}
repositories {
maven {
+ name = 'release'
if (ENV.MAVEN_URL) {
url ENV.MAVEN_URL
credentials {
@@ -271,6 +288,26 @@ publishing {
@@ -340,6 +347,26 @@ publishing {
}
}
}
Expand Down Expand Up @@ -141,18 +117,9 @@ index 31014b156127886c44921900f480e68d4528da25..ee1d4c3083cdb729df09522e88a41351
kotlin.stdlib.default.dependency = false
\ No newline at end of file
diff --git a/src/main/java/net/fabricmc/loom/LoomGradlePlugin.java b/src/main/java/net/fabricmc/loom/LoomGradlePlugin.java
index 9c9c938e2e57b1d41c732014a2d6f5bcefd37e7b..5f54c3745bd0e89cb3df6b56e8b2a36fcfb9e60b 100644
index 8231476d474a431b632ee75251dbc76e9212bc7f..98be8d15cac40265413e890bf9eca9acff017944 100644
--- a/src/main/java/net/fabricmc/loom/LoomGradlePlugin.java
+++ b/src/main/java/net/fabricmc/loom/LoomGradlePlugin.java
@@ -53,7 +53,7 @@ import net.fabricmc.loom.util.LibraryLocationLogger;
public class LoomGradlePlugin implements BootstrappedPlugin {
public static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
- public static final String LOOM_VERSION = Objects.requireNonNullElse(LoomGradlePlugin.class.getPackage().getImplementationVersion(), "0.0.0+unknown");
+ public static final String LOOM_VERSION = Objects.requireNonNullElse(LoomGradlePlugin.class.getPackage().getImplementationVersion(), "0.12.0+unknown");

/**
* An ordered list of setup job classes.
@@ -79,7 +79,7 @@ public class LoomGradlePlugin implements BootstrappedPlugin {
}

Expand All @@ -162,14 +129,6 @@ index 9c9c938e2e57b1d41c732014a2d6f5bcefd37e7b..5f54c3745bd0e89cb3df6b56e8b2a36f
LibraryLocationLogger.logLibraryVersions();

// Apply default plugins
@@ -94,5 +94,7 @@ public class LoomGradlePlugin implements BootstrappedPlugin {
for (Class<? extends Runnable> jobClass : SETUP_JOBS) {
project.getObjects().newInstance(jobClass).run();
}
+
+ project.apply(ImmutableMap.of("plugin", "io.github.juuxel.loom-vineflower"));
}
}
diff --git a/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java b/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java
index 29b4a526050a69cb5ccaa2d067fa5ecaa0347bf0..dc4895d24e908cf5d041ae71ef17dac40e6c86bf 100644
--- a/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java
Expand Down Expand Up @@ -270,7 +229,7 @@ index d7f0c469b92b3acfb24a623306f8d63bf44eafbe..12f19648c39d6eec91d8bd09cdd3400a

@Override
diff --git a/src/main/java/net/fabricmc/loom/task/launch/GenerateDLIConfigTask.java b/src/main/java/net/fabricmc/loom/task/launch/GenerateDLIConfigTask.java
index c47746099e922ab35c6528bf6992a3b1ed063018..d0cce1fab554e97e7dfca0855068b82a4e601bbc 100644
index c47746099e922ab35c6528bf6992a3b1ed063018..53a0976dfbb51cdcbd444380904145b87eecc110 100644
--- a/src/main/java/net/fabricmc/loom/task/launch/GenerateDLIConfigTask.java
+++ b/src/main/java/net/fabricmc/loom/task/launch/GenerateDLIConfigTask.java
@@ -55,15 +55,17 @@ public abstract class GenerateDLIConfigTask extends AbstractLoomTask {
Expand Down Expand Up @@ -310,6 +269,17 @@ index c47746099e922ab35c6528bf6992a3b1ed063018..d0cce1fab554e97e7dfca0855068b82a
}

final boolean plainConsole = getProject().getGradle().getStartParameter().getConsoleOutput() == ConsoleOutput.Plain;
@@ -133,6 +135,10 @@ public abstract class GenerateDLIConfigTask extends AbstractLoomTask {
}

public LaunchConfig property(String side, String key, String value) {
+ if (key.startsWith("loader.")) {
+ // add the fabric loader property too for compat
+ property(side, "fabric." + key.substring("loader.".length()), value);
+ }
values.computeIfAbsent(side + "Properties", (s -> new ArrayList<>()))
.add(String.format("%s=%s", key, value));
return this;
diff --git a/src/main/java/net/fabricmc/loom/task/service/SourceRemapperService.java b/src/main/java/net/fabricmc/loom/task/service/SourceRemapperService.java
index b3f5456c1317acc23b903df9451b59683d677dcf..18341c50640d4e42f2391ae46c3d2be772c3a18f 100644
--- a/src/main/java/net/fabricmc/loom/task/service/SourceRemapperService.java
Expand All @@ -324,7 +294,7 @@ index b3f5456c1317acc23b903df9451b59683d677dcf..18341c50640d4e42f2391ae46c3d2be7
}

diff --git a/src/main/java/net/fabricmc/loom/util/Constants.java b/src/main/java/net/fabricmc/loom/util/Constants.java
index eebfeee5b4b4245aa867ee4a3c8a1bf4ffae081a..d12a938af780a8adf995da406ce7a4c2274b7980 100644
index 42692aabc0c49424b9fab10ae84b627ce6f5a9d5..4ad7a56e0eb19032b16b570208021dac077a03cf 100644
--- a/src/main/java/net/fabricmc/loom/util/Constants.java
+++ b/src/main/java/net/fabricmc/loom/util/Constants.java
@@ -32,6 +32,7 @@ public class Constants {
Expand Down Expand Up @@ -353,7 +323,7 @@ index 3350a985f73e403f086a2a988283cbe4644d0cc2..eef1cd42b1e53497012165e1580c6199
+ }
}
diff --git a/src/main/java/net/fabricmc/loom/util/SourceRemapper.java b/src/main/java/net/fabricmc/loom/util/SourceRemapper.java
index 17fa8a52e63b8d17b7ae5e72402b47f4046f7e31..0ad332ebf7bf1dc6316ba3c32303a685c55e02a7 100644
index 1f4fca35e5773219317492661abadbc3161ecba1..c70e73680419435ee83960c21518ce6734fac9ab 100644
--- a/src/main/java/net/fabricmc/loom/util/SourceRemapper.java
+++ b/src/main/java/net/fabricmc/loom/util/SourceRemapper.java
@@ -128,7 +128,7 @@ public class SourceRemapper {
Expand Down Expand Up @@ -392,7 +362,7 @@ index 6575611dea711ca1bb284a76132110404cdd95cb..b6f0ed542dc183f5782e300c57dce2c3
private SharedServiceManager sharedServiceManager = new BuildSharedServiceManagerImpl();
private final AtomicInteger refCount = new AtomicInteger(0);
diff --git a/src/test/groovy/net/fabricmc/loom/test/integration/DecompileTest.groovy b/src/test/groovy/net/fabricmc/loom/test/integration/DecompileTest.groovy
index 5b2f0e105991b8493ca4473a0570cd7457156c07..2543ef15921abf504683452eb2e05cb2a05b1947 100644
index 7431aae09931a6e8656dfb801b9005feb0baa823..c755bb6bc8faa028b19392ce391adbb0cf10b05f 100644
--- a/src/test/groovy/net/fabricmc/loom/test/integration/DecompileTest.groovy
+++ b/src/test/groovy/net/fabricmc/loom/test/integration/DecompileTest.groovy
@@ -46,6 +46,7 @@ class DecompileTest extends Specification implements GradleProjectTestTrait {
Expand All @@ -402,12 +372,12 @@ index 5b2f0e105991b8493ca4473a0570cd7457156c07..2543ef15921abf504683452eb2e05cb2
+ 'vineflower' | "genSourcesWithVineflower" | PRE_RELEASE_GRADLE
'fernflower' | "genSourcesWithFernFlower" | PRE_RELEASE_GRADLE
'cfr' | "genSourcesWithCfr" | PRE_RELEASE_GRADLE
}
'vineflower' | "genSourcesWithVineflower" | PRE_RELEASE_GRADLE
diff --git a/src/test/groovy/net/fabricmc/loom/test/util/GradleProjectTestTrait.groovy b/src/test/groovy/net/fabricmc/loom/test/util/GradleProjectTestTrait.groovy
index a741f095beaa9510e4c723b7d8fc6079a91790db..0ee6af97f298a13b35ea6c9f794592fc6ec8fdce 100644
index 11e2a7070021ebd0fd9005b93151540c7c934b12..0ee3043e1a8429e37dca65e03f6e54498f3182f0 100644
--- a/src/test/groovy/net/fabricmc/loom/test/util/GradleProjectTestTrait.groovy
+++ b/src/test/groovy/net/fabricmc/loom/test/util/GradleProjectTestTrait.groovy
@@ -237,7 +237,7 @@ trait GradleProjectTestTrait {
@@ -238,7 +238,7 @@ trait GradleProjectTestTrait {
}

File getGeneratedSources(String mappings, String jarType = "merged") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ Subject: [PATCH] Exclude Fabric dependencies replaced by Quilt


diff --git a/src/main/java/net/fabricmc/loom/configuration/InstallerData.java b/src/main/java/net/fabricmc/loom/configuration/InstallerData.java
index 9496320b9c7f7c9374f208f5445ceb174a7837f2..4083a9cf3dc8c655743a9c1c58813b681a0aed1f 100644
index ce8da78d03c3bbcc19a9620c9d5d30fc8a058e7d..0d77a02472d055fab95613dbbd4e6dbaa08ea4f9 100644
--- a/src/main/java/net/fabricmc/loom/configuration/InstallerData.java
+++ b/src/main/java/net/fabricmc/loom/configuration/InstallerData.java
@@ -35,7 +35,7 @@ import net.fabricmc.loom.LoomRepositoryPlugin;
@@ -40,9 +40,8 @@ import net.fabricmc.loom.LoomRepositoryPlugin;
import net.fabricmc.loom.configuration.ide.idea.IdeaUtils;
import net.fabricmc.loom.util.Constants;

-public record InstallerData(String version, JsonObject installerJson) {
+public record InstallerData(String version, JsonObject installerJson, boolean isQuilt) {
private static final Logger LOGGER = LoggerFactory.getLogger(InstallerData.class);
-
public void applyToProject(Project project) {
LoomGradleExtension extension = LoomGradleExtension.get(project);

Expand Down
26 changes: 14 additions & 12 deletions patches/0003-Support-QMJ.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Support QMJ


diff --git a/src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java b/src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java
index 45587d96394ba1e4d9dffb790d80a76b4b3f39f8..74e2503874e0db6773a55309b56176f947258d90 100644
index 78584e11079ec0bb5000f5441ad159b65ed22b76..cfea29e66d4c9c266dbf87824b848446f36133b6 100644
--- a/src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java
+++ b/src/main/java/net/fabricmc/loom/api/LoomGradleExtensionAPI.java
@@ -141,10 +141,10 @@ public interface LoomGradleExtensionAPI {
@@ -144,10 +144,10 @@ public interface LoomGradleExtensionAPI {
void disableDeprecatedPomGeneration(MavenPublication publication);

/**
Expand Down Expand Up @@ -730,7 +730,7 @@ index 86316049c4c17f9362ab3a10cb25489d29a05229..04b0ede63d0f2058f0d84ac8db2ae5ed
scheduleSourcesRemapping(project, sourceRemapper, modDependency);
modDependencies.add(modDependency);
diff --git a/src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java b/src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
index f302600a4517988772961bf6b4c7c4f6ab07c8aa..26b28183a5aa9011cad6c457a6990989f03d54fa 100644
index 3ed36eef9786d0c89a45d5552d05be292425cee8..bfd83ec633a254ebc2aa1a05f7ffa88dadbb3e1a 100644
--- a/src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
+++ b/src/main/java/net/fabricmc/loom/configuration/mods/ModProcessor.java
@@ -47,6 +47,7 @@ import org.gradle.api.attributes.Usage;
Expand Down Expand Up @@ -762,10 +762,10 @@ index f302600a4517988772961bf6b4c7c4f6ab07c8aa..26b28183a5aa9011cad6c457a6990989
throw new UncheckedIOException("Failed to strip nested jars from %s".formatted(path), e);
}
diff --git a/src/main/java/net/fabricmc/loom/configuration/processors/ModJavadocProcessor.java b/src/main/java/net/fabricmc/loom/configuration/processors/ModJavadocProcessor.java
index 7a773e781f1698a0ffaa48f65472911b03a2a9b3..6107b609b2fad5f997b19bbf73dafafe1c82e012 100644
index 781ca37f2c763de0acbcb9254792052289ed00f9..ffdef6f8a9d6ae671c65a0068ec04426310e0474 100644
--- a/src/main/java/net/fabricmc/loom/configuration/processors/ModJavadocProcessor.java
+++ b/src/main/java/net/fabricmc/loom/configuration/processors/ModJavadocProcessor.java
@@ -36,17 +36,15 @@ import java.util.List;
@@ -38,18 +38,16 @@ import java.util.Objects;

import javax.inject.Inject;

Expand All @@ -779,12 +779,13 @@ index 7a773e781f1698a0ffaa48f65472911b03a2a9b3..6107b609b2fad5f997b19bbf73dafafe
import net.fabricmc.loom.api.processor.MinecraftJarProcessor;
import net.fabricmc.loom.api.processor.ProcessorContext;
import net.fabricmc.loom.api.processor.SpecContext;
import net.fabricmc.loom.util.Checksum;
-import net.fabricmc.loom.util.Constants;
-import net.fabricmc.loom.util.fmj.FabricModJson;
import net.fabricmc.mappingio.MappingReader;
import net.fabricmc.mappingio.tree.MappingTree;
import net.fabricmc.mappingio.tree.MemoryMappingTree;
@@ -70,8 +68,8 @@ public abstract class ModJavadocProcessor implements MinecraftJarProcessor<ModJa
@@ -73,8 +71,8 @@ public abstract class ModJavadocProcessor implements MinecraftJarProcessor<ModJa
public @Nullable ModJavadocProcessor.Spec buildSpec(SpecContext context) {
List<ModJavadoc> javadocs = new ArrayList<>();

Expand All @@ -795,9 +796,9 @@ index 7a773e781f1698a0ffaa48f65472911b03a2a9b3..6107b609b2fad5f997b19bbf73dafafe

if (javadoc != null) {
javadocs.add(javadoc);
@@ -106,19 +104,18 @@ public abstract class ModJavadocProcessor implements MinecraftJarProcessor<ModJa
@@ -110,20 +108,19 @@ public abstract class ModJavadocProcessor implements MinecraftJarProcessor<ModJa

public record ModJavadoc(String modId, MemoryMappingTree mappingTree) {
public record ModJavadoc(String modId, MemoryMappingTree mappingTree, String mappingsHash) {
@Nullable
- public static ModJavadoc create(FabricModJson fabricModJson) {
- final String modId = fabricModJson.getId();
Expand All @@ -813,13 +814,14 @@ index 7a773e781f1698a0ffaa48f65472911b03a2a9b3..6107b609b2fad5f997b19bbf73dafafe

- final String javaDocPath = customElement.getAsString();
final MemoryMappingTree mappings = new MemoryMappingTree();
final String mappingsHash;

try {
- final byte[] data = fabricModJson.getSource().read(javaDocPath);
+ final byte[] data = modJson.getSource().read(javaDocPath);
mappingsHash = Checksum.sha1Hex(data);

try (Reader reader = new InputStreamReader(new ByteArrayInputStream(data))) {
MappingReader.read(reader, mappings);
diff --git a/src/main/java/net/fabricmc/loom/configuration/processors/SpecContextImpl.java b/src/main/java/net/fabricmc/loom/configuration/processors/SpecContextImpl.java
index 622a0a1c6766aed0f526019e7cf09b5042ed8bac..2fa93c71cfa380874ac6a7107b461d2a63f97e9e 100644
--- a/src/main/java/net/fabricmc/loom/configuration/processors/SpecContextImpl.java
Expand Down Expand Up @@ -970,7 +972,7 @@ index 0ded46291e053224f91e053ecd5a70c25e2720a2..6b2099e99f220c336a7c6fa0f229b8ec
}
}
diff --git a/src/main/java/net/fabricmc/loom/task/RemapJarTask.java b/src/main/java/net/fabricmc/loom/task/RemapJarTask.java
index e680792c2267acfbce354f42a125c5e7bf73e423..330ea8ece29f26a1e85a9dc844c234c588fa0e55 100644
index 9639f3d18bb22c437bbb0d93ac025474adc0cf03..71ccb96214c455694fe9e824991b7cca0075cc1d 100644
--- a/src/main/java/net/fabricmc/loom/task/RemapJarTask.java
+++ b/src/main/java/net/fabricmc/loom/task/RemapJarTask.java
@@ -59,9 +59,9 @@ import net.fabricmc.accesswidener.AccessWidenerReader;
Expand All @@ -994,7 +996,7 @@ index e680792c2267acfbce354f42a125c5e7bf73e423..330ea8ece29f26a1e85a9dc844c234c5
import net.fabricmc.loom.util.service.BuildSharedServiceManager;
import net.fabricmc.loom.util.service.UnsafeWorkQueueHelper;
import net.fabricmc.tinyremapper.OutputConsumerPath;
@@ -151,13 +150,14 @@ public abstract class RemapJarTask extends AbstractRemapJarTask {
@@ -153,13 +152,14 @@ public abstract class RemapJarTask extends AbstractRemapJarTask {
final LoomGradleExtension extension = LoomGradleExtension.get(getProject());
final MixinExtension mixinExtension = extension.getMixin();

Expand All @@ -1012,7 +1014,7 @@ index e680792c2267acfbce354f42a125c5e7bf73e423..330ea8ece29f26a1e85a9dc844c234c5

for (SourceSet sourceSet : mixinExtension.getMixinSourceSets()) {
MixinExtension.MixinInformationContainer container = Objects.requireNonNull(
@@ -263,16 +263,18 @@ public abstract class RemapJarTask extends AbstractRemapJarTask {
@@ -265,16 +265,18 @@ public abstract class RemapJarTask extends AbstractRemapJarTask {
}

private void remapAccessWidener() throws IOException {
Expand Down
Loading

0 comments on commit bf0261e

Please sign in to comment.