Interface MinecraftExtension
- All Superinterfaces:
MinecraftMappingsContainer
- All Known Subinterfaces:
MinecraftExtensionForProject
The main extension for ForgeGradle, where the Minecraft dependency resolution takes place.
Restrictions
- When declaring Minecraft dependencies, only module
dependencies are
supported.
- The resulting Minecraft dependency is created by the Minecraft Mavenizer. It is not merely a dependency transformation, which means that it cannot use file and project dependencies to generate the Minecraft artifacts.
- Attempting to provide a non-module dependency to
MinecraftExtensionForProject.dependency(Object), will cause the build to fail.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> Deprecated.default org.gradle.api.artifacts.repositories.MavenArtifactRepositorymavenizer(org.gradle.api.artifacts.dsl.RepositoryHandler repositories) Adds the generated Minecraft maven to the given repository handler.Methods inherited from interface MinecraftMappingsContainer
getMappings, mappings, mappings
-
Field Details
-
NAME
-
-
Method Details
-
getMavenizer
@Deprecated(since="7.0") org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getMavenizer()Deprecated.Usemavenizer(RepositoryHandler)instead, as it has special handling to avoid pitfalls when including the mavenizer output in your repositories.A closure for the Minecraft Mavenizer's output to be passed intoRepositoryHandler.maven(Closure).Declaring this in your buildscript is required for the Minecraft dependencies to resolve properly.
repositories { maven minecraft.maven }- Returns:
- The closure
- See Also:
-
mavenizer
default org.gradle.api.artifacts.repositories.MavenArtifactRepository mavenizer(org.gradle.api.artifacts.dsl.RepositoryHandler repositories) Adds the generated Minecraft maven to the given repository handler.minecraft.maven(repositories)- Parameters:
repositories- The repository handler to add the maven to- Returns:
- The Minecraft maven
- See Also:
- API Note:
- This version includes special logic to avoid pitfalls when adding the Mavenizer output as a repository when using ForgeGradle in a subproject, for example, if all projects need to use the Forge maven.
-
mavenizer(RepositoryHandler)instead, as it has special handling to avoid pitfalls when including the mavenizer output in your repositories.