MovingBlocks

Develop an interactive command for the gradle build system

Terasology's gradle build system handles most of the boring and complicated parts of the build process - you can set up a project using gradlew idea, run the game from source with gradlew run and create a fully setup headless server by running gradlew server. However, some of these commands require some manual changes after they're ran - for instance, createModule requires that the user manually inputs metadata info for the new module. Steps like these can be integrated into the gradle command itself.

Definition of 'Done'

  • A pull request is submitted to the Terasology engine repository with one or more interactive gradle commands that generate files or perform actions based on user input.

Where to start?

  • Gradle scripts are Groovy scripts, so you can use all the functionality of Groovy in them, including java.io.Console - use this to process user input. Take a look at this blog post for more details.
  • As an example, an interactive version of gradlew createModule should ask the user to provide a module name, an initial version, a description, and your author name, then create the module metadata file based on the provided data. Think of similar ways to improve other gradle commands!

Task tags

  • gradle
  • scripting
  • utility

Students who completed this task

Max Borsch

Task type

  • code Code
close

2016