Package org.spongepowered.gradle.vanilla
Interface MinecraftExtension
-
- All Superinterfaces:
MinecraftRepositoryExtension
- All Known Implementing Classes:
MinecraftExtensionImpl
public interface MinecraftExtension extends MinecraftRepositoryExtension
Properties that can configure how VanillaGradle applies Minecraft to the current project.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaccessWideners(java.lang.Object... file)Apply access wideners to the project.RunConfigurationContainergetRuns()Get run configurations configured for this project.voidinjectedVersion(java.lang.Object versionFile)Use a version derived from a provided file.voidlatestRelease()Set the version of Minecraft used to the latest release.voidlatestSnapshot()Set the version of Minecraft used to the latest snapshot.org.gradle.api.provider.Property<MinecraftPlatform>platform()Get a property pointing to the Minecraft platform being prepared.voidplatform(MinecraftPlatform platform)Set the platform/environment of Minecraft to prepare.voidruns(groovy.lang.Closure run)Operate on the available run configurations.voidruns(org.gradle.api.Action<RunConfigurationContainer> run)Operate on the available run configurations.org.gradle.api.provider.Property<java.lang.String>version()Get a property pointing to the version of Minecraft to prepare.voidversion(java.lang.String version)Set the version of Minecraft to prepare.-
Methods inherited from interface org.spongepowered.gradle.vanilla.repository.MinecraftRepositoryExtension
injectRepositories, injectRepositories, injectVersion, injectVersion
-
-
-
-
Method Detail
-
version
org.gradle.api.provider.Property<java.lang.String> version()
Get a property pointing to the version of Minecraft to prepare.Values of the property are unvalidated!
There is no default value.
- Returns:
- the version
-
version
void version(java.lang.String version)
Set the version of Minecraft to prepare.This version is only validated when the Minecraft development environment is prepared.
- Parameters:
version- the minecraft version
-
injectedVersion
void injectedVersion(java.lang.Object versionFile)
Use a version derived from a provided file.This allows building against Minecraft versions that may not be available in the ordinary version list, such as combat snapshots.
- Parameters:
versionFile- a file-like object that can be handled byProject.file(Object)
-
latestRelease
void latestRelease()
Set the version of Minecraft used to the latest release.This should only be used in development workspaces or for analysis tools.
-
latestSnapshot
void latestSnapshot()
Set the version of Minecraft used to the latest snapshot.This should only be used in development workspaces or for analysis tools.
-
platform
org.gradle.api.provider.Property<MinecraftPlatform> platform()
Get a property pointing to the Minecraft platform being prepared.Default:
JOINED- Returns:
- the platform property
-
platform
void platform(MinecraftPlatform platform)
Set the platform/environment of Minecraft to prepare.- Parameters:
platform- the platform
-
accessWideners
void accessWideners(java.lang.Object... file)
Apply access wideners to the project.Access wideners can only be added before the first time a Minecraft dependency is resolved.
- Parameters:
file- any file that can be passed toProject.file(Object)
-
getRuns
RunConfigurationContainer getRuns()
Get run configurations configured for this project.Every run configuration will automatically have Minecraft on its classpath.
- Returns:
- the run configuration.
-
runs
void runs(@DelegatesTo(value=RunConfigurationContainer.class,strategy=1) groovy.lang.Closure run)
Operate on the available run configurations.- Parameters:
run- a closure operating on the run configuration container
-
runs
void runs(org.gradle.api.Action<RunConfigurationContainer> run)
Operate on the available run configurations.- Parameters:
run- an action operating on the run configuration container
-
-