WIP AT -> JarProcessor

This commit is contained in:
shedaniel
2021-04-04 20:19:18 +08:00
parent 6a25a40ff9
commit 4fe9b81e32
20 changed files with 706 additions and 228 deletions

View File

@@ -0,0 +1,15 @@
package net.fabricmc.loom.task;
import static net.fabricmc.loom.task.GenerateSourcesTask.getMappedJarFileWithSuffix;
import java.nio.file.Files;
import org.gradle.api.tasks.TaskAction;
public class CleanSourcesTask extends AbstractLoomTask {
@TaskAction
public void doTask() throws Throwable {
Files.deleteIfExists(getMappedJarFileWithSuffix(getProject(), "-sources.jar", false).toPath());
Files.deleteIfExists(getMappedJarFileWithSuffix(getProject(), "-sources.jar", true).toPath());
}
}