Skip to content
zml edited this page Jul 7, 2021 · 6 revisions

VanillaGradle provides very few user-facing tasks, since most of its work is done during the resolution of Configurations.

Most tasks will be triggered automatically during IDE imports. The one exception is decompile, since it is CPU-intensive and unnecessary for basic development.

decompile

Generate a decompiled sources variant of the active Minecraft version using ForgeFlower. This is not required for development, but is helpful to enable IDE inspections and provide a better viewing experience.

Properties

For use in buildscripts:

  • extraFernFlowerArgs: A map of argument to value, containing extra arguments to pass to fernflower. This can override any of VanillaGradle's default arguments.

For use at the command line:

  • --force: If provided, will cause a decompile to happen even if there is an existing sources jar.

dumpClass (since 0.2.1)

This class will dump the bytecode of any class on the Minecraft classpath for inspection. It uses the version of asm-util defined in the classDump configuration, by default 9.1. This can be overridden on a project level if necessary.

Properties

These properties are intended to be specified as command-line flags for the Gradle invocation.

Name Description Required
class The binary name of the class to dump, without a .class suffix yes
asm A boolean flag which, if present, will cause ASMIfier output to be used instead of Textifier no
to A file to write output to instead of the console, relative to the project's build directory no

displayMinecraftVersions

Displays all Minecraft versions that can be targeted with the available data.

genEclipseRuns

Generate run configurations for Eclipse. This task is run automatically by Buildship on import.

There is one user-modifiable parameter, preserveExisting, which defaults to false. If this property is set to true, any existing run configurations with the same names as the project's configurations will not be overwritten. This can be used if testing local modifications to the run configurations, but means that any changes from the Gradle project will not be applied to the Eclipse configurations.

cleanAllMinecraft

Clear the current version of VanillaGradle cache. This is not normally necessary, but could help to free up some disk space.

prepareWorkspace

Perform tasks necessary for preparing a full development workspace, including downloading assets and natives necessary to run the Minecraft client. This task is normally run automatically on IDE import.

Clone this wiki locally