Add architectury decompiler (#59)

* Add architectury decompiler

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Perhaps let's not include javaexec helpers

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Fix checkstyle and resolve reviews

Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
shedaniel
2021-12-04 03:55:47 +08:00
committed by GitHub
parent 537057bb61
commit 6a18e007a7
11 changed files with 163 additions and 13 deletions

View File

@@ -147,7 +147,7 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
params.getSourcesDestinationJar().set(getMappedJarFileWithSuffix("-sources.jar"));
params.getLinemap().set(getMappedJarFileWithSuffix("-sources.lmap"));
params.getLinemapJar().set(getMappedJarFileWithSuffix("-linemapped.jar"));
params.getMappings().set(getMappings().toFile());
params.getMappings().set(getMappings(getProject(), getExtension()).toFile());
if (ipcPath != null) {
params.getIPCPath().set(ipcPath.toFile());
@@ -308,11 +308,11 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
return new File(path.substring(0, path.length() - 4) + suffix);
}
private Path getMappings() {
Path baseMappings = getExtension().isForge() ? getExtension().getMappingsProvider().tinyMappingsWithSrg : getExtension().getMappingsProvider().tinyMappings;
static Path getMappings(Project project, LoomGradleExtension extension) {
Path baseMappings = extension.isForge() ? extension.getMappingsProvider().tinyMappingsWithSrg : extension.getMappingsProvider().tinyMappings;
if (getExtension().getEnableTransitiveAccessWideners().get()) {
List<AccessWidenerFile> accessWideners = getExtension().getTransitiveAccessWideners();
if (extension.getEnableTransitiveAccessWideners().get()) {
List<AccessWidenerFile> accessWideners = extension.getTransitiveAccessWideners();
if (accessWideners.isEmpty()) {
return baseMappings;
@@ -326,7 +326,7 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
throw new RuntimeException("Failed to create temp file", e);
}
TransitiveAccessWidenerMappingsProcessor.process(baseMappings, outputMappings, accessWideners, getProject().getLogger());
TransitiveAccessWidenerMappingsProcessor.process(baseMappings, outputMappings, accessWideners, project.getLogger());
return outputMappings;
}