mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
Merge branch 'dev/0.6-forge' into dev/0.7-forge
# Conflicts: # src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java # src/main/java/net/fabricmc/loom/task/RemapJarTask.java # src/main/java/net/fabricmc/loom/task/RemapSourcesJarTask.java # src/main/java/net/fabricmc/loom/util/SourceRemapper.java
This commit is contained in:
@@ -37,18 +37,25 @@ import net.fabricmc.loom.util.SourceRemapper;
|
||||
public class RemapSourcesJarTask extends AbstractLoomTask {
|
||||
private Object input;
|
||||
private Object output;
|
||||
private String direction = "intermediary";
|
||||
private String from = "named";
|
||||
private String direction;
|
||||
private SourceRemapper sourceRemapper = null;
|
||||
private boolean preserveFileTimestamps = true;
|
||||
private boolean reproducibleFileOrder = false;
|
||||
|
||||
public RemapSourcesJarTask() {
|
||||
this.direction = SourceRemapper.intermediary(getProject());
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
public void remap() throws Exception {
|
||||
if (sourceRemapper == null) {
|
||||
SourceRemapper.remapSources(getProject(), getInput(), getOutput(), direction.equals("named"), reproducibleFileOrder, preserveFileTimestamps);
|
||||
if (from.equals(direction)) {
|
||||
SourceRemapper.remapSources(getProject(), getInput(), getOutput(),
|
||||
direction.equals("named") ? SourceRemapper.intermediary(getProject()) : "named", direction, reproducibleFileOrder, preserveFileTimestamps);
|
||||
} else {
|
||||
SourceRemapper.remapSources(getProject(), getInput(), getOutput(), from, direction, reproducibleFileOrder, preserveFileTimestamps);
|
||||
}
|
||||
} else {
|
||||
sourceRemapper.scheduleRemapSources(getInput(), getOutput(), reproducibleFileOrder, preserveFileTimestamps);
|
||||
}
|
||||
@@ -74,6 +81,11 @@ public class RemapSourcesJarTask extends AbstractLoomTask {
|
||||
return getProject().file(output == null ? input : output);
|
||||
}
|
||||
|
||||
@Input
|
||||
public String getSourceNamespace() {
|
||||
return from;
|
||||
}
|
||||
|
||||
@Input
|
||||
public String getTargetNamespace() {
|
||||
return direction;
|
||||
@@ -87,6 +99,10 @@ public class RemapSourcesJarTask extends AbstractLoomTask {
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
public void setSourceNamespace(String value) {
|
||||
this.from = value;
|
||||
}
|
||||
|
||||
public void setTargetNamespace(String value) {
|
||||
this.direction = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user