mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
Fix checkstyle and resolve reviews
Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
@@ -119,8 +119,6 @@ public interface LoomGradleExtension extends LoomGradleExtensionAPI {
|
||||
// ===================
|
||||
// Architectury Loom
|
||||
// ===================
|
||||
Project getProject();
|
||||
|
||||
default PatchProvider getPatchProvider() {
|
||||
return getDependencyManager().getProvider(PatchProvider.class);
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ public class MinecraftProviderImpl extends DependencyProvider implements Minecra
|
||||
if (isNewerThan21w39a != null) {
|
||||
return isNewerThan21w39a;
|
||||
}
|
||||
|
||||
|
||||
return isNewerThan21w39a = ZipUtils.contains(minecraftServerJar.toPath(), "META-INF/versions.list");
|
||||
}
|
||||
|
||||
|
||||
@@ -207,10 +207,10 @@ public class McpConfigProvider extends DependencyProvider {
|
||||
List<String> args = this.args.stream()
|
||||
.map(str -> {
|
||||
return switch (str) {
|
||||
case "{input}" -> input.toAbsolutePath().toString();
|
||||
case "{output}" -> output.toAbsolutePath().toString();
|
||||
case "{mappings}" -> mappings.toAbsolutePath().toString();
|
||||
default -> str;
|
||||
case "{input}" -> input.toAbsolutePath().toString();
|
||||
case "{output}" -> output.toAbsolutePath().toString();
|
||||
case "{mappings}" -> mappings.toAbsolutePath().toString();
|
||||
default -> str;
|
||||
};
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
@@ -87,7 +87,6 @@ import org.objectweb.asm.tree.ClassNode;
|
||||
|
||||
import net.fabricmc.loom.configuration.DependencyProvider;
|
||||
import net.fabricmc.loom.configuration.providers.MinecraftProviderImpl;
|
||||
import net.fabricmc.loom.extension.LoomGradleExtensionImpl;
|
||||
import net.fabricmc.loom.util.Constants;
|
||||
import net.fabricmc.loom.util.DependencyDownloader;
|
||||
import net.fabricmc.loom.util.FileSystemUtil;
|
||||
|
||||
@@ -87,7 +87,7 @@ public abstract class LoomGradleExtensionApiImpl implements LoomGradleExtensionA
|
||||
// ===================
|
||||
// Architectury Loom
|
||||
// ===================
|
||||
protected final ListProperty<ArchitecturyLoomDecompiler> archDecompilers;
|
||||
private final ListProperty<ArchitecturyLoomDecompiler> archDecompilers;
|
||||
private Provider<ModPlatform> platform;
|
||||
private boolean silentMojangMappingsLicense = false;
|
||||
public Boolean generateSrgTiny = null;
|
||||
|
||||
@@ -87,7 +87,7 @@ public class LoomGradleExtensionImpl extends LoomGradleExtensionApiImpl implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public Project getProject() {
|
||||
protected Project getProject() {
|
||||
return project;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package net.fabricmc.loom.task.architectury;
|
||||
package net.fabricmc.loom.task;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -35,8 +35,6 @@ import org.gradle.api.tasks.InputFile;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
|
||||
import net.fabricmc.loom.api.decompilers.architectury.ArchitecturyLoomDecompiler;
|
||||
import net.fabricmc.loom.task.AbstractLoomTask;
|
||||
import net.fabricmc.loom.task.GenerateSourcesTask;
|
||||
import net.fabricmc.loom.util.Constants;
|
||||
import net.fabricmc.loom.util.OperatingSystem;
|
||||
|
||||
@@ -72,7 +70,7 @@ public abstract class ArchitecturyGenerateSourcesTask extends AbstractLoomTask {
|
||||
params.getSourcesDestinationJar().set(GenerateSourcesTask.getMappedJarFileWithSuffix(getProject(), "-sources.jar"));
|
||||
params.getLinemap().set(GenerateSourcesTask.getMappedJarFileWithSuffix(getProject(), "-sources.lmap"));
|
||||
params.getLinemapJar().set(GenerateSourcesTask.getMappedJarFileWithSuffix(getProject(), "-linemapped.jar"));
|
||||
params.getMappings().set(GenerateSourcesTask.getMappings(getExtension()).toFile());
|
||||
params.getMappings().set(GenerateSourcesTask.getMappings(getProject(), getExtension()).toFile());
|
||||
|
||||
params.getClassPath().setFrom(getProject().getConfigurations().getByName(Constants.Configurations.MINECRAFT_DEPENDENCIES));
|
||||
|
||||
@@ -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(getExtension()).toFile());
|
||||
params.getMappings().set(getMappings(getProject(), getExtension()).toFile());
|
||||
|
||||
if (ipcPath != null) {
|
||||
params.getIPCPath().set(ipcPath.toFile());
|
||||
@@ -308,7 +308,7 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
|
||||
return new File(path.substring(0, path.length() - 4) + suffix);
|
||||
}
|
||||
|
||||
public static Path getMappings(LoomGradleExtension extension) {
|
||||
static Path getMappings(Project project, LoomGradleExtension extension) {
|
||||
Path baseMappings = extension.isForge() ? extension.getMappingsProvider().tinyMappingsWithSrg : extension.getMappingsProvider().tinyMappings;
|
||||
|
||||
if (extension.getEnableTransitiveAccessWideners().get()) {
|
||||
@@ -326,7 +326,7 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
|
||||
throw new RuntimeException("Failed to create temp file", e);
|
||||
}
|
||||
|
||||
TransitiveAccessWidenerMappingsProcessor.process(baseMappings, outputMappings, accessWideners, extension.getProject().getLogger());
|
||||
TransitiveAccessWidenerMappingsProcessor.process(baseMappings, outputMappings, accessWideners, project.getLogger());
|
||||
|
||||
return outputMappings;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ import net.fabricmc.loom.api.decompilers.architectury.ArchitecturyLoomDecompiler
|
||||
import net.fabricmc.loom.configuration.ide.RunConfigSettings;
|
||||
import net.fabricmc.loom.configuration.ide.SetupIntelijRunConfigs;
|
||||
import net.fabricmc.loom.configuration.providers.mappings.MappingsProviderImpl;
|
||||
import net.fabricmc.loom.task.architectury.ArchitecturyGenerateSourcesTask;
|
||||
import net.fabricmc.loom.util.Constants;
|
||||
|
||||
public final class LoomTasks {
|
||||
|
||||
@@ -37,7 +37,6 @@ import java.util.stream.Collectors;
|
||||
import com.google.common.base.Stopwatch;
|
||||
import org.apache.commons.io.output.NullOutputStream;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.file.FileCollection;
|
||||
import org.gradle.api.logging.LogLevel;
|
||||
import org.gradle.api.logging.configuration.ShowStacktrace;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user