Make resolvable copies of configurations not consumable (#920)

This prevents info-level log warnings from mod remapping
from flooding the console.
This commit is contained in:
Juuz
2023-07-02 23:38:55 +03:00
committed by GitHub
parent 8abe00a2b1
commit 28b8caf8f1
2 changed files with 2 additions and 0 deletions

View File

@@ -96,6 +96,7 @@ public class ModConfigurationRemapper {
final Configuration sourceCopy = entry.getSourceConfiguration().get().copyRecursive();
final Usage usage = project.getObjects().named(Usage.class, runtime ? Usage.JAVA_RUNTIME : Usage.JAVA_API);
sourceCopy.attributes(attributes -> attributes.attribute(Usage.USAGE_ATTRIBUTE, usage));
sourceCopy.setCanBeConsumed(false);
configsToRemap.put(sourceCopy, target);
// If our remap configuration entry targets the client source set as well,

View File

@@ -129,6 +129,7 @@ public record SpecContextImpl(List<FabricModJson> modDependencies, List<FabricMo
return settings -> {
final Configuration configuration = settings.getSourceConfiguration().get().copyRecursive();
configuration.setCanBeConsumed(false);
configuration.attributes(attributes -> attributes.attribute(Usage.USAGE_ATTRIBUTE, usage));
return configuration.resolve().stream().map(File::toPath);
};