Fix mixin mapping being shared between all projects.
parent
545b0c946b
commit
20be96e733
|
@ -399,4 +399,8 @@ public class LoomGradleExtension {
|
|||
public boolean isShareCaches() {
|
||||
return shareCaches;
|
||||
}
|
||||
|
||||
public File getMixinMappings() {
|
||||
return new File(getProjectBuildCache(), "mixin-map-" + getMinecraftProvider().getMinecraftVersion() + "-" + getMappingsProvider().mappingsVersion + ".tiny");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,6 @@ public class MappingsProvider extends DependencyProvider {
|
|||
// The mappings we use in practice
|
||||
public File tinyMappings;
|
||||
public File tinyMappingsJar;
|
||||
public File mappingsMixinExport;
|
||||
|
||||
public MappingsProvider(Project project) {
|
||||
super(project);
|
||||
|
@ -277,7 +276,6 @@ public class MappingsProvider extends DependencyProvider {
|
|||
|
||||
private void initFiles() {
|
||||
baseTinyMappings = mappingsDir.resolve(mappingsName + "-tiny-" + minecraftVersion + "-" + mappingsVersion + "-base");
|
||||
mappingsMixinExport = new File(getExtension().getProjectBuildCache(), "mixin-map-" + minecraftVersion + "-" + mappingsVersion + ".tiny");
|
||||
}
|
||||
|
||||
public void cleanFiles() {
|
||||
|
@ -290,8 +288,6 @@ public class MappingsProvider extends DependencyProvider {
|
|||
Files.deleteIfExists(baseTinyMappings);
|
||||
}
|
||||
|
||||
mappingsMixinExport.delete();
|
||||
|
||||
if (tinyMappings != null) {
|
||||
tinyMappings.delete();
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ public class RemapJarTask extends Jar {
|
|||
);
|
||||
Path[] classpath = classpathFiles.stream().map(File::toPath).filter((p) -> !input.equals(p) && Files.exists(p)).toArray(Path[]::new);
|
||||
|
||||
File mixinMapFile = mappingsProvider.mappingsMixinExport;
|
||||
File mixinMapFile = extension.getMixinMappings();
|
||||
Path mixinMapPath = mixinMapFile.toPath();
|
||||
|
||||
TinyRemapper.Builder remapperBuilder = TinyRemapper.newRemapper();
|
||||
|
@ -194,7 +194,7 @@ public class RemapJarTask extends Jar {
|
|||
jarRemapper.addMappings(TinyRemapperMappingsHelper.create(mappingsProvider.getMappings(), fromM, toM, false));
|
||||
}
|
||||
|
||||
File mixinMapFile = mappingsProvider.mappingsMixinExport;
|
||||
File mixinMapFile = extension.getMixinMappings();
|
||||
Path mixinMapPath = mixinMapFile.toPath();
|
||||
|
||||
if (mixinMapFile.exists()) {
|
||||
|
|
|
@ -73,7 +73,7 @@ public abstract class AnnotationProcessorInvoker<T extends Task> {
|
|||
LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class);
|
||||
Map<String, String> args = new HashMap<String, String>() {{
|
||||
put("inMapFileNamedIntermediary", extension.getMappingsProvider().tinyMappings.getCanonicalPath());
|
||||
put("outMapFileNamedIntermediary", extension.getMappingsProvider().mappingsMixinExport.getCanonicalPath());
|
||||
put("outMapFileNamedIntermediary", extension.getMixinMappings().getCanonicalPath());
|
||||
put("outRefMapFile", getRefmapDestination(task, extension));
|
||||
put("defaultObfuscationEnv", "named:intermediary");
|
||||
}};
|
||||
|
|
Loading…
Reference in New Issue