Skip to content

Script manifest

The script manifest is a file called manifest.json which should be included in every script, located in the resources folder. This file consist of several properties that are outlined below.

  • package_name the package name of your script, this must match the package name as provided when registering the script in the Cereal Developer Console.
  • name the name of your script used to list it in the tasks overview in the Cereal application.
  • version_code a positive integer used as an internal version number. This number helps determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not shown to users. Make sure that each successive release of your script uses a greater value.
  • sdk_version the version of the Cereal SDK your script was built against (e.g., "1.9.0"). This must match the cereal-sdk dependency version declared in your build file. Users with an older version of the SDK (included in the Cereal client) will be prompted to update. When using the script template, this value is automatically injected from the version catalog at build time.
  • script the fully qualified class name of the main script package. Make sure that ProGuard keeps these classes; when using the script template, this is already the case.
  • child_scripts (optional) list of fully qualified class names for child script packages, if any. Make sure that ProGuard keeps these classes; when using the script template, this is already the case.
  • instructions (optional) instructions to display at the top of the script configuration screen. Use this to provide users with important setup information or configuration guidelines.

The manifest file must be included when the script jar is uploaded to the developer console.

Example

{
  "package_name": "com.cereal",
  "name": "My Script",
  "version_code": 1,
  "sdk_version": "1.9.0",
  "script": "com.cereal.MyScript",
  "child_scripts": [
    "com.cereal.child.MyChildScript"
  ],
  "instructions": "You need to have a registered account before using this script."
}

Example (minimal)

{
  "package_name": "com.cereal",
  "name": "My Script",
  "version_code": 1,
  "sdk_version": "1.9.0",
  "script": "com.cereal.MyScript"
}