From 80f4351d0eca44fbf55d3adaf2c9a0bbd9f4ffd3 Mon Sep 17 00:00:00 2001 From: supersaiyansubtlety Date: Mon, 11 Nov 2024 02:07:37 -0800 Subject: [PATCH] make QuiltMappingsExtension local variable names clearer and consistent --- .../internal/plugin/MapIntermediaryPlugin.java | 8 ++++---- .../internal/plugin/MapMinecraftJarsPlugin.java | 8 ++++---- .../quilt/internal/plugin/MinecraftJarsPlugin.java | 14 +++++++------- .../internal/plugin/ProcessMappingsPlugin.java | 4 ++-- .../quilt/internal/plugin/TargetDiffPlugin.java | 6 +++--- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/buildSrc/src/main/java/quilt/internal/plugin/MapIntermediaryPlugin.java b/buildSrc/src/main/java/quilt/internal/plugin/MapIntermediaryPlugin.java index c83a4ed642..58b3200ea4 100644 --- a/buildSrc/src/main/java/quilt/internal/plugin/MapIntermediaryPlugin.java +++ b/buildSrc/src/main/java/quilt/internal/plugin/MapIntermediaryPlugin.java @@ -58,7 +58,7 @@ protected MapIntermediaryExtension applyImpl(@NotNull Project project) { // apply required plugins and save their registered objects final PluginContainer plugins = project.getPlugins(); - final QuiltMappingsExtension ext = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); + final QuiltMappingsExtension quiltExt = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); final MapV2Plugin.Tasks mappingsV2Tasks = plugins.apply(MapV2Plugin.class).getExt().getTasks(); @@ -73,7 +73,7 @@ protected MapIntermediaryExtension applyImpl(@NotNull Project project) { ExtractTinyIntermediaryMappingsTask.class, task -> { task.getExtractionDest().convention(this.provideMappingsBuildFile( - ext.provideSuffixedMinecraftVersion("-" + Namespaces.INTERMEDIARY + "." + Extensions.TINY) + quiltExt.provideSuffixedMinecraftVersion("-" + Namespaces.INTERMEDIARY + "." + Extensions.TINY) )); } ); @@ -125,7 +125,7 @@ protected MapIntermediaryExtension applyImpl(@NotNull Project project) { final var intermediaryV2MappingsJar = tasks.register( IntermediaryMappingsV2JarTask.INTERMEDIARY_V_2_MAPPINGS_JAR_TASK_NAME, IntermediaryMappingsV2JarTask.class, - ext.getUnpickVersion() + quiltExt.getUnpickVersion() ); intermediaryV2MappingsJar.configure(task -> { task.getMappings().convention(removeIntermediary.flatMap(RemoveIntermediaryTask::getOutputMappings)); @@ -136,7 +136,7 @@ protected MapIntermediaryExtension applyImpl(@NotNull Project project) { final var intermediaryV2MergedMappingsJar = tasks.register( IntermediaryMappingsV2JarTask.INTERMEDIARY_V_2_MERGED_MAPPINGS_JAR_TASK_NAME, IntermediaryMappingsV2JarTask.class, - ext.getUnpickVersion() + quiltExt.getUnpickVersion() ); intermediaryV2MergedMappingsJar.configure(task -> { task.getMappings().convention(mergeIntermediary.flatMap(MergeIntermediaryTask::getOutputMappings)); diff --git a/buildSrc/src/main/java/quilt/internal/plugin/MapMinecraftJarsPlugin.java b/buildSrc/src/main/java/quilt/internal/plugin/MapMinecraftJarsPlugin.java index fc91174820..d234bc7eef 100644 --- a/buildSrc/src/main/java/quilt/internal/plugin/MapMinecraftJarsPlugin.java +++ b/buildSrc/src/main/java/quilt/internal/plugin/MapMinecraftJarsPlugin.java @@ -85,7 +85,7 @@ protected MapMinecraftJarsExtension applyImpl(@NotNull Project project) { // configures MappingsDirOutputtingTasks (generatePackageInfoMappings) // configures MappingsDirConsumingTasks // (buildMappingsTiny, dropInvalidMappings, findDuplicateMappingFiles, mappingLint) - final QuiltMappingsExtension ext = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); + final QuiltMappingsExtension quiltExt = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); final MinecraftJarsPlugin.Tasks minecraftJarsTasks = plugins.apply(MinecraftJarsPlugin.class).getExt().getTasks(); @@ -104,7 +104,7 @@ protected MapMinecraftJarsExtension applyImpl(@NotNull Project project) { task.getZippedFile().convention(this.provideRequiredFile(perVersionMappings)); task.getExtractionDest().convention(this.provideMappingsBuildFile( - ext.provideSuffixedMinecraftVersion("-" + Classifiers.INTERMEDIATE + "." + Extensions.TINY) + quiltExt.provideSuffixedMinecraftVersion("-" + Classifiers.INTERMEDIATE + "." + Extensions.TINY) )); } ); @@ -146,7 +146,7 @@ protected MapMinecraftJarsExtension applyImpl(@NotNull Project project) { task.getOutputJar().convention( this.provideMappedMinecraftBuildFile( - ext.provideSuffixedMinecraftVersion("-" + Classifiers.INTERMEDIATE + "." + Extensions.JAR) + quiltExt.provideSuffixedMinecraftVersion("-" + Classifiers.INTERMEDIATE + "." + Extensions.JAR) ) ); } @@ -231,7 +231,7 @@ protected MapMinecraftJarsExtension applyImpl(@NotNull Project project) { task.getArtifactBaseName().convention(Constants.MAPPINGS_NAME); - task.getArtifactVersion().convention(ext.getMappingsVersion()); + task.getArtifactVersion().convention(quiltExt.getMappingsVersion()); task.getArtifactClassifier().convention(Classifiers.TINY); } diff --git a/buildSrc/src/main/java/quilt/internal/plugin/MinecraftJarsPlugin.java b/buildSrc/src/main/java/quilt/internal/plugin/MinecraftJarsPlugin.java index 0491c9b50a..d1d90b0a5d 100644 --- a/buildSrc/src/main/java/quilt/internal/plugin/MinecraftJarsPlugin.java +++ b/buildSrc/src/main/java/quilt/internal/plugin/MinecraftJarsPlugin.java @@ -40,7 +40,7 @@ public abstract class MinecraftJarsPlugin extends DefaultExtensionedMappingsProj protected MinecraftJarsExtension applyImpl(@NotNull Project project) { final PluginContainer plugins = project.getPlugins(); - final QuiltMappingsExtension ext = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); + final QuiltMappingsExtension quiltExt = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); final TaskContainer tasks = project.getTasks(); @@ -57,13 +57,13 @@ protected MinecraftJarsExtension applyImpl(@NotNull Project project) { "https://piston-meta.mojang.com/mc/game/version_manifest_v2." + Extensions.JSON ); - params.getVersion().set(ext.getMinecraftVersion()); + params.getVersion().set(quiltExt.getMinecraftVersion()); }) ) ); task.getDest().convention( - this.provideMinecraftBuildFile(ext.provideSuffixedMinecraftVersion("." + Extensions.JSON)) + this.provideMinecraftBuildFile(quiltExt.provideSuffixedMinecraftVersion("." + Extensions.JSON)) ); } ); @@ -84,11 +84,11 @@ protected MinecraftJarsExtension applyImpl(@NotNull Project project) { DownloadMinecraftJarsTask.class, task -> { task.getClientJar().convention(this.provideMinecraftBuildFile( - ext.provideSuffixedMinecraftVersion("-client." + Extensions.JAR) + quiltExt.provideSuffixedMinecraftVersion("-client." + Extensions.JAR) )); task.getServerBootstrapJar().convention(this.provideMinecraftBuildFile( - ext.provideSuffixedMinecraftVersion("-server-bootstrap." + Extensions.JAR) + quiltExt.provideSuffixedMinecraftVersion("-server-bootstrap." + Extensions.JAR) )); } ); @@ -102,7 +102,7 @@ protected MinecraftJarsExtension applyImpl(@NotNull Project project) { ); task.getExtractionDest().convention( - this.provideMinecraftBuildFile(ext.provideSuffixedMinecraftVersion("-server." + Extensions.JAR)) + this.provideMinecraftBuildFile(quiltExt.provideSuffixedMinecraftVersion("-server." + Extensions.JAR)) ); } ); @@ -116,7 +116,7 @@ protected MinecraftJarsExtension applyImpl(@NotNull Project project) { task.getServerJar().convention(extractServerJar.flatMap(ExtractServerJarTask::getExtractionDest)); task.getMergedFile().convention( - this.provideMinecraftBuildFile(ext.provideSuffixedMinecraftVersion("-merged." + Extensions.JAR)) + this.provideMinecraftBuildFile(quiltExt.provideSuffixedMinecraftVersion("-merged." + Extensions.JAR)) ); } ); diff --git a/buildSrc/src/main/java/quilt/internal/plugin/ProcessMappingsPlugin.java b/buildSrc/src/main/java/quilt/internal/plugin/ProcessMappingsPlugin.java index fa68801c97..8ba24273bd 100644 --- a/buildSrc/src/main/java/quilt/internal/plugin/ProcessMappingsPlugin.java +++ b/buildSrc/src/main/java/quilt/internal/plugin/ProcessMappingsPlugin.java @@ -69,7 +69,7 @@ protected ProcessMappingsExtension applyImpl(@NotNull Project project) { // adds javadoc task plugins.apply(JavaPlugin.class); - final QuiltMappingsExtension ext = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); + final QuiltMappingsExtension quiltExt = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); final MinecraftJarsPlugin.Tasks minecraftJarsTasks = plugins.apply(MinecraftJarsPlugin.class).getExt().getTasks(); @@ -158,7 +158,7 @@ protected ProcessMappingsExtension applyImpl(@NotNull Project project) { }); tasks.register(JavadocJarTask.JAVADOC_JAR_TASK_NAME, JavadocJarTask.class, task -> { - task.getArchiveVersion().convention(ext.getMappingsVersion()); + task.getArchiveVersion().convention(quiltExt.getMappingsVersion()); task.from(javadoc.map(Javadoc::getDestinationDir)); }); diff --git a/buildSrc/src/main/java/quilt/internal/plugin/TargetDiffPlugin.java b/buildSrc/src/main/java/quilt/internal/plugin/TargetDiffPlugin.java index b524e69880..cd9685f033 100644 --- a/buildSrc/src/main/java/quilt/internal/plugin/TargetDiffPlugin.java +++ b/buildSrc/src/main/java/quilt/internal/plugin/TargetDiffPlugin.java @@ -84,7 +84,7 @@ public abstract class TargetDiffPlugin implements MappingsProjectPlugin { public void apply(@NotNull Project project) { final PluginContainer plugins = project.getPlugins(); - final QuiltMappingsExtension ext = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); + final QuiltMappingsExtension quiltExt = plugins.apply(QuiltMappingsBasePlugin.class).getExt(); final MinecraftJarsPlugin.Tasks minecraftJarsTasks = plugins.apply(MinecraftJarsPlugin.class).getExt().getTasks(); @@ -104,7 +104,7 @@ public void apply(@NotNull Project project) { DownloadTargetMetaFileTask.DOWNLOAD_TARGET_META_FILE_TASK_NAME, DownloadTargetMetaFileTask.class, task -> { - task.getMinecraftVersion().convention(ext.getMinecraftVersion()); + task.getMinecraftVersion().convention(quiltExt.getMinecraftVersion()); task.getDest().convention(this.provideMinecraftBuildFile( task.getMinecraftVersion().map(createQuiltFileNameBuilder("." + Extensions.JSON)) @@ -157,7 +157,7 @@ public void apply(@NotNull Project project) { // put mapped provider in a property so all tasks use the same cached value final Property unpickVersionsMatch = this.getObjects().property(Boolean.class); unpickVersionsMatch.set(provideUnpickVersionsMatch( - ext.getUnpickVersion(), + quiltExt.getUnpickVersion(), extractTargetMappingsJar .flatMap(ExtractTargetMappingJarTask::getExtractionDest) .map(dest -> dest.file(MappingsV2JarTask.JAR_UNPICK_META_PATH))