Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle cleanup #645

Merged
Show file tree
Hide file tree
Changes from 90 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
f4b190c
make simple_type_field_names an input of insertAutoGeneratedMappings …
supersaiyansubtlety Sep 28, 2024
6b31f26
replace MappingTask::getTaskByType with MappingsTask::getTaskNamed; t…
supersaiyansubtlety Sep 28, 2024
d85deac
the registerening
supersaiyansubtlety Sep 28, 2024
e82c12d
move downloadVersionsManifest and downloadWantedVersionManifest confi…
supersaiyansubtlety Sep 28, 2024
c4d9e65
move downloadMinecraftJars, extractServerJar, and mergeJars configura…
supersaiyansubtlety Sep 28, 2024
55061bc
move downloadMinecraftLibraries and openGlConstantUnpickGenerator con…
supersaiyansubtlety Sep 29, 2024
300be97
AbstractDownloadMappingsTask -> DownloadMappingsTask, reworked its pr…
supersaiyansubtlety Sep 30, 2024
397ff37
move conventions for MergeTinyTask, MergeTinyV2Task, and MergeInterme…
supersaiyansubtlety Oct 1, 2024
2a8f330
update MapJarTask and subclasses
supersaiyansubtlety Oct 2, 2024
f00402d
add missing .get().getAsFile()s to fix genFakeSource and decompileVin…
supersaiyansubtlety Oct 4, 2024
60784b6
move combineUnpickDefinitions and remapUnpickDefinitions configuratio…
supersaiyansubtlety Oct 5, 2024
79bed13
move generated unpick definition outputs to fileConstants.buildDir
supersaiyansubtlety Oct 6, 2024
e0652a2
rename MappingsPlugin -> QuiltMappingsPlugin and its id mappings-logi…
supersaiyansubtlety Oct 6, 2024
a7a374e
move mappings, mappingsUnpicked, mappingsServer, and mappingsUnpicked…
supersaiyansubtlety Oct 7, 2024
790a24b
improve unpickVersion handling
supersaiyansubtlety Oct 12, 2024
035bbbc
move the following tasks' configuration to QuiltMappingsPlugin and re…
supersaiyansubtlety Oct 12, 2024
83aea68
move tinyJar configuration to QuiltMappingsPlugin
supersaiyansubtlety Oct 14, 2024
85a454a
remove CheckIntermediaryMappingsTask and DownloadIntermediaryMappings…
supersaiyansubtlety Oct 14, 2024
f2698db
remove downloadPerVersionMappings and DownloadMappingsTask
supersaiyansubtlety Oct 14, 2024
1a3ee52
refine TransformJarClassesTask properties
supersaiyansubtlety Oct 14, 2024
5196aa8
move tempDir to build/ and its definition to QuiltMappingsPlugin
supersaiyansubtlety Oct 15, 2024
9d844ae
rework CheckTargetVersionExistsTask -> DownloadTargetMetaFileTask
supersaiyansubtlety Oct 15, 2024
fe28b36
rework CheckUnpickVersionsMatchTask -> UnpickVersionsMatchSource
supersaiyansubtlety Oct 15, 2024
81221ef
make MapJarTask::getAdditionalMappings an input
supersaiyansubtlety Oct 15, 2024
16b67b2
remove @Optional from TargetVersionConsumingTask's inputs since only …
supersaiyansubtlety Oct 16, 2024
f94e3da
replace intermediary task input exists checks with IntermediaryDepend…
supersaiyansubtlety Oct 16, 2024
383a93c
replace AbstractDecompiler's Project with a Logger
supersaiyansubtlety Oct 16, 2024
1104155
extract MappingsTask::startDownload into DownloadTask
supersaiyansubtlety Oct 16, 2024
a1aa6a4
update CombineUnpickDefinitionsTask's and UnpickGenTask's javadocs
supersaiyansubtlety Oct 16, 2024
d287a98
rename DownloadImmediate.Builder -> Downloader and eliminate Download…
supersaiyansubtlety Oct 16, 2024
b3aa4ea
extract 'diff' group to Constants.Groups.DIFF
supersaiyansubtlety Oct 16, 2024
5a189c9
extract common logic of ExtractServerJarTask, ExtractTinyMappingsTask…
supersaiyansubtlety Oct 16, 2024
507783b
add custom task classes for QuiltMappingsPlugin tasks that lack them
supersaiyansubtlety Oct 16, 2024
c45dfa6
add DownloadUtils which uses FileUtils::copyURLToFile
supersaiyansubtlety Oct 19, 2024
8bc4325
@Inject and use ArchiveOperations in AbstractExtractZipTask
supersaiyansubtlety Oct 22, 2024
81985fa
move licenser plugin info to libs.versions.toml
supersaiyansubtlety Oct 22, 2024
cbe3883
make simple_type_field_names an input of insertAutoGeneratedMappings…
supersaiyansubtlety Oct 22, 2024
d516404
extract "net/minecraft/unused/packageinfo/" constant
supersaiyansubtlety Oct 22, 2024
c4dea3c
replace MappingsJavadocProvider.Source with mapped providers so they …
supersaiyansubtlety Oct 22, 2024
1e3c8c9
extract mappings namespace constants
supersaiyansubtlety Oct 22, 2024
002c6dd
add generateDiff task (not yet used in generate-diff.yml)
supersaiyansubtlety Oct 23, 2024
a08308a
add quilt/internal/plugin package
supersaiyansubtlety Oct 24, 2024
735134f
extract the following plugins:
supersaiyansubtlety Oct 24, 2024
ba5cd27
extract magic classifier constants
supersaiyansubtlety Oct 25, 2024
79a7847
improve DiffDirectoriesTask
supersaiyansubtlety Oct 25, 2024
7b18deb
use 'all' gradle distribution
supersaiyansubtlety Oct 26, 2024
3128e64
add ArtifactFileProducingTask and implement it on CompressTinyTask
supersaiyansubtlety Oct 26, 2024
bfea1f8
name AbstractArchiveTask subclass tasks using its archive name compos…
supersaiyansubtlety Oct 26, 2024
55e28df
rename package tasks -> task
supersaiyansubtlety Oct 27, 2024
68c6f5b
improve javadocs, esp. for configurEach
supersaiyansubtlety Oct 27, 2024
e9fb2d4
extract EnigmaMappingsPlugin and TargetDiffPlugin
supersaiyansubtlety Oct 28, 2024
03086d7
use JavaExec::getArgumentProviders instead of overriding task action …
supersaiyansubtlety Oct 28, 2024
dd25e26
replace VersionDownloadInfo with VersionParser
supersaiyansubtlety Oct 28, 2024
b7d2918
add artifact helper methods to ArtifactFileTask
supersaiyansubtlety Oct 28, 2024
709c86a
replace Constants.MINECRAFT_VERSION with libs version and pass it to …
supersaiyansubtlety Oct 28, 2024
a410bb3
move hashed/hashed-unpicked/named jars to build/minecraft/mapped/
supersaiyansubtlety Oct 29, 2024
4764011
move .gradle/targets -> build/targets
supersaiyansubtlety Oct 29, 2024
ef06a2e
convert Constants to an interface and move it to new constants package
supersaiyansubtlety Oct 29, 2024
9614c1f
rename configuration unpick -> unpickCli
supersaiyansubtlety Oct 29, 2024
ed65300
add convenient hack to ArtifactFileTask
supersaiyansubtlety Oct 29, 2024
10f6d73
provide default dictionary file name in MappingsVerificationPlugin in…
supersaiyansubtlety Oct 30, 2024
70bf742
remove @DisableCachingByDefault from MappingsV2JarTask because it's a…
supersaiyansubtlety Oct 30, 2024
035f7a5
categorize TODOs
supersaiyansubtlety Oct 30, 2024
3c5e536
DownloadMinecraftLibrariesTask:
supersaiyansubtlety Oct 30, 2024
2dcca8f
DownloadVersionsManifestTask: replace @DisableCachingByDefault with U…
supersaiyansubtlety Oct 30, 2024
0dd9de2
DownloadWantedVersionManifestTask: remove release time input; obsolet…
supersaiyansubtlety Oct 30, 2024
adfd00c
OpenGlConstantUnpickGenTask:
supersaiyansubtlety Oct 30, 2024
b48cd11
remove DownloadMinecraftJarsTask's outsputs upToDateWhen checksum che…
supersaiyansubtlety Oct 30, 2024
27e4397
recategorize TODO for javadoc
supersaiyansubtlety Oct 30, 2024
aeadc2b
replace DownloadVersionsManifestTask with SerializableVersionEntry.So…
supersaiyansubtlety Oct 30, 2024
e4b01a1
replace DownloadDictionaryFileTask with ivy repository hack in build.…
supersaiyansubtlety Oct 30, 2024
ff5ac8d
merge MappingsVerificationPlugin into MapMinecraftJarsPlugin
supersaiyansubtlety Oct 30, 2024
e79eaae
remove cache limitation on javadoc task
supersaiyansubtlety Oct 30, 2024
a1c4c48
enable caching in gradle.properties
supersaiyansubtlety Oct 30, 2024
48cfa93
add quilt.mappings.debug.javadoc property
supersaiyansubtlety Oct 30, 2024
ac4168d
clean DecompileVineflowerTask's output dir instead of deleting it
supersaiyansubtlety Oct 30, 2024
35824dd
remove TODO QUESTION about mergeTinyV2's old dependency on v2Unmerged…
supersaiyansubtlety Oct 30, 2024
a8a7847
rename getSimpleTypeFieldNamesFiles -> getProfileFileDependencies
supersaiyansubtlety Oct 30, 2024
6247bd8
make Namespaces PER_VERSION and INTERMEDIARY the sources of truth for…
supersaiyansubtlety Oct 30, 2024
8c8ad2a
rename all constants containing PER_VERSION -> INTERMEDIATE
supersaiyansubtlety Oct 30, 2024
667109a
increase gradle memory from 3Gb to 4Gb because decompileTargetVineflo…
supersaiyansubtlety Oct 31, 2024
9a69306
add libs.enigma.plugin dependency back to enigmaSwing and enigmaServe…
supersaiyansubtlety Nov 1, 2024
ab4d13d
Merge branch '24w45a' into procrastination+gradle-cleanup
supersaiyansubtlety Nov 10, 2024
60080cf
Merge branch '24w45a' into procrastination+gradle-cleanup (with 24w45…
supersaiyansubtlety Nov 11, 2024
9f22997
bring the thisening, the bracketing, the line wrappening, and the fin…
supersaiyansubtlety Nov 11, 2024
a83a27b
eliminate MappingsTask
supersaiyansubtlety Nov 11, 2024
9dd5f7a
eliminate DefaultMappingsTask
supersaiyansubtlety Nov 11, 2024
cda4060
utilize streams better in UnpickJarTask
supersaiyansubtlety Nov 11, 2024
5f1af63
replace Default/TaskedMappingsProjectPlugin/DefaultTaskedMappingsProj…
supersaiyansubtlety Nov 11, 2024
80f4351
make QuiltMappingsExtension local variable names clearer and consistent
supersaiyansubtlety Nov 11, 2024
f2fc3e3
ArtifactFileTask:
supersaiyansubtlety Nov 14, 2024
242b3ad
obtain gson, commons-codec, and commons-compress versions for javadoc…
supersaiyansubtlety Nov 14, 2024
e90a1a9
clean up resolved TODOs
supersaiyansubtlety Nov 14, 2024
9115785
re-remove asm snapshot repo which snuck back in during a merge
supersaiyansubtlety Nov 14, 2024
da90291
use task logger instead of project logger in Javadoc
supersaiyansubtlety Nov 14, 2024
60f7328
Merge branch '24w46a' into procrastination+gradle-cleanup
supersaiyansubtlety Nov 19, 2024
49d01a4
put CacheableTask on DownloadWantedVersionManifestTask, DownloadMinec…
supersaiyansubtlety Nov 20, 2024
d5b8b3e
Merge branch '1.21.4-pre1' into procrastination+gradle-cleanup
supersaiyansubtlety Nov 21, 2024
15840e3
Merge branch '1.21.4-pre1' into procrastination+gradle-cleanup
supersaiyansubtlety Nov 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
506 changes: 136 additions & 370 deletions build.gradle

Large diffs are not rendered by default.

59 changes: 48 additions & 11 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ plugins {
repositories {
mavenCentral()
maven {
name "Quilt Repositiory"
name "Quilt Repository"
url "https://maven.quiltmc.org/repository/release"
}
maven {
name "Quilt Snapshot Repositiory"
name "Quilt Snapshot Repository"
url "https://maven.quiltmc.org/repository/snapshot"
}
maven {
Expand All @@ -21,10 +21,6 @@ repositories {
name "Mojang"
url 'https://libraries.minecraft.net/'
}
// remove when ASM fix is released
maven {
url = "https://repository.ow2.org/nexus/content/repositories/snapshots/"
}
mavenLocal()
}

Expand All @@ -34,7 +30,6 @@ configurations {

dependencies {
implementation(libs.commons.io)
implementation(libs.download.task)
implementation(libs.guava)
implementation(libs.jackson.xml)
implementation(libs.launchermeta.parser)
Expand Down Expand Up @@ -86,9 +81,51 @@ test {

gradlePlugin {
plugins {
mappingsLogic {
id = 'mappings-logic'
implementationClass = 'quilt.internal.MappingsPlugin'
final pluginPackage = 'quilt.internal.plugin.'

quiltMappingsBase {
id = 'quilt-mappings-base'
implementationClass = pluginPackage + 'QuiltMappingsBasePlugin'
}

minecraftJars {
id = 'minecraft-jars'
implementationClass = pluginPackage + 'MinecraftJarsPlugin'
}

mapMinecraftJars {
id = 'map-minecraft-jars'
implementationClass = pluginPackage + 'MapMinecraftJarsPlugin'
}

mapV2 {
id = 'map-v2'
implementationClass = pluginPackage + 'MapV2Plugin'
}

mapIntermediary {
id = 'map-intermediary'
implementationClass = pluginPackage + 'MapIntermediaryPlugin'
}

processMappings {
id = 'process-mappings'
implementationClass = pluginPackage + 'ProcessMappingsPlugin'
}

enigmaMappings {
id = 'enigma-mappings'
implementationClass = pluginPackage + 'EnigmaMappingsPlugin'
}

targetDiff {
id = 'target-diff'
implementationClass = pluginPackage + 'TargetDiffPlugin'
}

quiltMappings {
id = 'quilt-mappings'
implementationClass = pluginPackage + 'QuiltMappingsPlugin'
}
}
}
}
1 change: 1 addition & 0 deletions buildSrc/classpath-holders/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
56 changes: 56 additions & 0 deletions buildSrc/classpath-holders/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
plugins {
id 'java'
}

// these contain the classpath contents necessary for JavaExec tasks registered by buildSrc plugins
configurations {
configurations.ext.classpathHolder = { String configName, String capabilityName ->
configurations.create(configName) {
canBeResolved = false

attributes.attribute Usage.USAGE_ATTRIBUTE, objects.named(Usage, Usage.JAVA_RUNTIME)

components.java.addVariantsFromConfiguration(it) { }

outgoing.capability "$group:$capabilityName:$version"
}
}

// for UnpickJarTask
classpathHolder 'unpickCli', "$name-unpick-cli"

// for EnigmaMappingsTask
classpathHolder 'enigmaSwing', "$name-enigma-swing"

// for EnigmaMappingsServerTask
classpathHolder 'enigmaServer', "$name-enigma-server"
}

repositories {
mavenCentral()

maven {
name "Quilt Repository"
url "https://maven.quiltmc.org/repository/release"
}

maven {
name "Fabric Repository"
url 'https://maven.fabricmc.net'
}

// TODO remove when ASM fix is released
maven {
url = "https://repository.ow2.org/nexus/content/repositories/snapshots/"
}
}

dependencies {
unpickCli libs.unpick.cli

enigmaSwing libs.enigma.swing
enigmaSwing libs.enigma.plugin

enigmaServer libs.enigma.server
enigmaServer libs.enigma.plugin
}
3 changes: 3 additions & 0 deletions buildSrc/classpath-holders/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
group = quilt.internal
# version is irrelevant
version = 1.0
7 changes: 7 additions & 0 deletions buildSrc/classpath-holders/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../../gradle/libs.versions.toml"))
}
}
}
2 changes: 2 additions & 0 deletions buildSrc/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ dependencyResolutionManagement {
}
}
}

includeBuild 'classpath-holders'
22 changes: 0 additions & 22 deletions buildSrc/src/main/java/quilt/internal/Constants.java

This file was deleted.

43 changes: 0 additions & 43 deletions buildSrc/src/main/java/quilt/internal/FileConstants.java

This file was deleted.

15 changes: 0 additions & 15 deletions buildSrc/src/main/java/quilt/internal/MappingsExtension.java

This file was deleted.

89 changes: 0 additions & 89 deletions buildSrc/src/main/java/quilt/internal/MappingsPlugin.java

This file was deleted.

21 changes: 21 additions & 0 deletions buildSrc/src/main/java/quilt/internal/constants/Classifiers.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package quilt.internal.constants;

public interface Classifiers {
String INTERMEDIATE = Namespaces.INTERMEDIATE;
String NAMED = Namespaces.NAMED;
String INTERMEDIARY = Namespaces.INTERMEDIARY;

String V2 = "v2";
String MERGED_V2 = "merged" + V2;
String INTERMEDIARY_V2 = INTERMEDIARY + "-" + V2;
String INTERMEDIARY_V2_MERGED = INTERMEDIARY + "-" + MERGED_V2;

String UNPICKED = "unpicked";
String INTERMEDIATE_UNPICKED = INTERMEDIATE + "-" + UNPICKED;

String TINY = Constants.TINY_NAME;

String CONSTANTS = "constants";
String JAVADOC = "javadoc";
String SOURCES = "sources";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package quilt.internal.constants;

public interface Constants {
String MAPPINGS_NAME = "quilt-mappings";

String UNPICK_NAME = "unpick";

String TINY_NAME = "tiny";
}
11 changes: 11 additions & 0 deletions buildSrc/src/main/java/quilt/internal/constants/Extensions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package quilt.internal.constants;

import org.gradle.jvm.tasks.Jar;

public interface Extensions {
String JAR = Jar.DEFAULT_EXTENSION;
String TINY = Constants.TINY_NAME;
String UNPICK = Constants.UNPICK_NAME;
String GZ = "gz";
String JSON = "json";
}
Loading
Loading