diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2021-12-11 13:28:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-11 19:28:06 +0800 |
commit | 1da4f6db847ef781da8a45a1951cad11f9c0449a (patch) | |
tree | 5c31e2f7a1d55187cfe90523839449e0805625dc /src/main/java/net/fabricmc/loom/util | |
parent | e00026ef4629c41f4e8f7e0cc23eb5cb67bf84ea (diff) | |
download | architectury-loom-1da4f6db847ef781da8a45a1951cad11f9c0449a.tar.gz architectury-loom-1da4f6db847ef781da8a45a1951cad11f9c0449a.tar.bz2 architectury-loom-1da4f6db847ef781da8a45a1951cad11f9c0449a.zip |
Add forgeRuntimeLibrary configuration + some clean up (#64)
Diffstat (limited to 'src/main/java/net/fabricmc/loom/util')
-rw-r--r-- | src/main/java/net/fabricmc/loom/util/Constants.java | 15 | ||||
-rw-r--r-- | src/main/java/net/fabricmc/loom/util/DependencyDownloader.java | 10 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/net/fabricmc/loom/util/Constants.java b/src/main/java/net/fabricmc/loom/util/Constants.java index 8160b361..8a68b0fb 100644 --- a/src/main/java/net/fabricmc/loom/util/Constants.java +++ b/src/main/java/net/fabricmc/loom/util/Constants.java @@ -79,9 +79,24 @@ public class Constants { public static final String FORGE_USERDEV = "forgeUserdev"; public static final String FORGE_INSTALLER = "forgeInstaller"; public static final String FORGE_UNIVERSAL = "forgeUniversal"; + /** + * Forge's own dependencies. Not intended to be used by users, + * {@link #FORGE_RUNTIME_LIBRARY forgeRuntimeLibrary} is for that instead. + */ public static final String FORGE_DEPENDENCIES = "forgeDependencies"; public static final String FORGE_NAMED = "forgeNamed"; + /** + * "Extra" runtime dependencies on Forge. Contains the Minecraft resources + * and {@linkplain Dependencies#FORGE_RUNTIME the Architectury Loom runtime}. + */ public static final String FORGE_EXTRA = "forgeExtra"; + /** + * The configuration used to create the Forge runtime classpath file list. + * Users can also directly add files to this config. + * + * @see net.fabricmc.loom.configuration.providers.forge.ForgeUserdevProvider + */ + public static final String FORGE_RUNTIME_LIBRARY = "forgeRuntimeLibrary"; public static final String MAPPING_CONSTANTS = "mappingsConstants"; public static final String UNPICK_CLASSPATH = "unpick"; /** diff --git a/src/main/java/net/fabricmc/loom/util/DependencyDownloader.java b/src/main/java/net/fabricmc/loom/util/DependencyDownloader.java index 85bcbe00..329d88bf 100644 --- a/src/main/java/net/fabricmc/loom/util/DependencyDownloader.java +++ b/src/main/java/net/fabricmc/loom/util/DependencyDownloader.java @@ -81,6 +81,16 @@ public final class DependencyDownloader { return files; } + /** + * Resolves a configuration and its superconfigurations. + * + * <p>Note that unlike resolving a {@linkplain Configuration#copyRecursive() recursive copy} of the configuration, + * this method overrides the transitivity of all superconfigurations as well. + * + * @param configuration the configuration to resolve + * @param transitive true if transitive dependencies should be included, false otherwise + * @return a mutable set containing the resolved files of the configuration + */ public static Set<File> resolveFiles(Configuration configuration, boolean transitive) { return resolve(configuration, transitive); } |