search

linkDataPack Configuration

The configuration function allows configuring the output of the generated datapack.

linkExample

dataPack("mypack") {
	configuration {
		prettyPrint = true
		prettyPrintIndent = "  "
	}

	// ... rest of datapack code
}
Kotlin

This will configure the JSON output to be pretty printed with two spaces for indentation.

The available configuration options are:

  • prettyPrint - Whether to pretty print the JSON. Default is false.
  • prettyPrintIndent - The string to use for indenting when pretty printing. Only whitespace characters are allowed. Default is empty string.
  • generatedFunctionsFolder - The folder where the generated functions are stored. Defaults to "generated_scopes".
  • generateCommentOfGeneratedFunctionCall - Whether to generate a comment when an implicit generated function is called. Default is true.

Configuring a datapack is pretty useful for debugging.