Don't allow none reproducible dependencies in layered mappings as it breaks the caching guarantee.
This commit is contained in:
parent
6666b95b54
commit
d8675e056b
2 changed files with 4 additions and 1 deletions
|
@ -30,6 +30,7 @@ import java.nio.file.Path;
|
|||
import org.gradle.api.Project;
|
||||
import org.gradle.api.artifacts.Configuration;
|
||||
import org.gradle.api.artifacts.Dependency;
|
||||
import org.gradle.api.artifacts.ResolutionStrategy;
|
||||
import org.gradle.api.logging.Logger;
|
||||
|
||||
import net.fabricmc.loom.LoomGradleExtension;
|
||||
|
@ -50,6 +51,8 @@ public class GradleMappingContext implements MappingContext {
|
|||
@Override
|
||||
public Path resolveDependency(Dependency dependency) {
|
||||
Configuration configuration = project.getConfigurations().detachedConfiguration(dependency);
|
||||
// Don't allow changing versions as this breaks down with how we cache layered mappings.
|
||||
configuration.resolutionStrategy(ResolutionStrategy::failOnNonReproducibleResolution);
|
||||
return configuration.getSingleFile().toPath();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ dependencies {
|
|||
minecraft "com.mojang:minecraft:1.16.5"
|
||||
mappings loom.layered() {
|
||||
officialMojangMappings()
|
||||
parchment("org.parchmentmc.data:parchment-1.16.5:20210608-SNAPSHOT@zip")
|
||||
parchment("org.parchmentmc.data:parchment-1.16.5:2021.10.10@zip")
|
||||
}
|
||||
|
||||
modImplementation "net.fabricmc:fabric-loader:0.11.3"
|
||||
|
|
Loading…
Reference in a new issue