Merge branch 'pull/205' into dev/0.4
# Conflicts: # src/main/java/net/fabricmc/loom/task/RemapJarTask.javadev/0.11
commit
11e24e57b4
|
@ -297,6 +297,7 @@ public class AbstractPlugin implements Plugin<Project> {
|
|||
|
||||
extension.addUnmappedMod(jarTask.getArchivePath().toPath());
|
||||
remapJarTask.getAddNestedDependencies().set(true);
|
||||
remapJarTask.getRemapAccessWidener().set(true);
|
||||
|
||||
project1.getArtifacts().add("archives", remapJarTask);
|
||||
remapJarTask.dependsOn(jarTask);
|
||||
|
|
|
@ -99,6 +99,10 @@ public class LoomGradleExtension {
|
|||
return installerJson;
|
||||
}
|
||||
|
||||
public void accessWidener(Object file) {
|
||||
this.accessWidener = project.file(file);
|
||||
}
|
||||
|
||||
public File getUserCache() {
|
||||
File userCache = new File(project.getGradle().getGradleUserHomeDir(), "caches" + File.separator + "fabric-loom");
|
||||
|
||||
|
|
|
@ -53,11 +53,15 @@ import net.fabricmc.tinyremapper.TinyUtils;
|
|||
public class RemapJarTask extends Jar {
|
||||
private RegularFileProperty input;
|
||||
private Property<Boolean> addNestedDependencies;
|
||||
private Property<Boolean> remapAccessWidener;
|
||||
|
||||
public RemapJarTask() {
|
||||
super();
|
||||
input = GradleSupport.getfileProperty(getProject());
|
||||
addNestedDependencies = getProject().getObjects().property(Boolean.class);
|
||||
remapAccessWidener = getProject().getObjects().property(Boolean.class);
|
||||
// false by default, I have no idea why I have to do it for this property and not the other one
|
||||
remapAccessWidener.set(false);
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
|
@ -114,7 +118,7 @@ public class RemapJarTask extends Jar {
|
|||
throw new RuntimeException("Failed to remap " + input + " to " + output, e);
|
||||
}
|
||||
|
||||
if (extension.accessWidener != null) {
|
||||
if (getRemapAccessWidener().getOrElse(false) && extension.accessWidener != null) {
|
||||
extension.getJarProcessorManager().getByType(AccessWidenerJarProcessor.class).remapAccessWidener(output, remapper.getRemapper());
|
||||
}
|
||||
|
||||
|
@ -155,4 +159,9 @@ public class RemapJarTask extends Jar {
|
|||
public Property<Boolean> getAddNestedDependencies() {
|
||||
return addNestedDependencies;
|
||||
}
|
||||
|
||||
@Input
|
||||
public Property<Boolean> getRemapAccessWidener() {
|
||||
return remapAccessWidener;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue