logo

class

build::Target

sys::Obj
  build::Target

Target models a build target which may be executed independently within a build script. Targets are the top level unit for organizing build scripts - each script publishes its available targets via BuildScript.targets.

Slots

description

readonly Str description

Description is used for usage summary.

func

readonly Func func

Function to invoke when this target is executed.

make

new make(BuildScript script, Str name, Str description, Func func)

Construct a target to run under the specified build script. The name is the key used to invoke this target from the command line. Description is used for usage summary. Method is invoked when this target is executed.

name

readonly Str name

Name is the key used to invoke this target from the command line.

run

virtual Void run()

Run this target by invoking the target's method. If the target fails to run then it should report errors via the log and throw FatalBuildErr.

script

readonly BuildScript script

Return the parent build script associated with this task.

toStr

override Str toStr()

Return name.