Allow for non-yarn mappings for MigrateMappingsTask (#141)

* Add getExtension utility method to AbstractLoomTask

* Support non-yarn mappings in MigrateMappingsTask

* Fix style

* Assume Yarn mappings if correct notation was not supplied

* Move load mappings block into its own its own method

Also added protected to getExtension on AbstractLoomTask

* Use Option instead of environment variables

* Assume V2 Yarn by default

* Some restructuring

All works the same.
This commit is contained in:
Ramid Khan
2019-11-16 07:16:09 +11:00
committed by modmuss50
parent 11af956c84
commit 55a9d90690
8 changed files with 93 additions and 77 deletions

View File

@@ -27,7 +27,6 @@ package net.fabricmc.loom.task;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.gradle.api.Project;
import org.gradle.api.tasks.TaskAction;
import net.fabricmc.loom.LoomGradleExtension;
@@ -35,8 +34,7 @@ import net.fabricmc.loom.LoomGradleExtension;
public class CleanLoomBinaries extends AbstractLoomTask {
@TaskAction
public void run() {
Project project = this.getProject();
LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class);
LoomGradleExtension extension = getExtension();
extension.getMinecraftProvider().getMergedJar().delete();
extension.getMinecraftMappedProvider().getIntermediaryJar().delete();
extension.getMinecraftMappedProvider().getMappedJar().delete();