Skip to content
drogatkin edited this page Nov 5, 2012 · 1 revision

The set include statements for creation build files.

variable - defines a variable with specified name and set value when specified. example
value - specifies a value which can be literal constant, value of variable, name of property, directory, path, eval, and some others. Used attribute type for qualification.
    to get property value: name="property_name" type="property"
    to consider value as directory: type="directory"
    to consider value as absolute path: type="path"
    to consider value as array: type="array", default separator in a blank, unless separator defined.
    to consider value as file or array of files: type="file", wildcard extended to get matching array of files without extending name to absolute path
    to consider value as environment value: type="environment" name="name of env variable"
    to consider value as number: type="number"
    to consider value as date: type="date"
    to consider value as name of variable type="eval"
target - defines an addressable build task. Attribute name defines a name of target which can be specified in command line of 7Bee. Attribute dir is optional and provides a work directory for target if it's different than for a project. A target description can be specified in attribute comment. example
expression - allows to combine operators functions to set a variable value. example
task - define a build task. Attributes name and code used for calling a class, exec for an OS executable, path provides additional path or class path. Attributes stdout, stderr and stdin can specify variables keeping a content of corresponding streams of a running process. Parameters (parameter) specify strings passed in command line or main() arguments. If name of a parameter specified then it is used as a definition which is available by System.getProperty(). example
dependency - define a a dependency of a build task. All dependencies are evaluated. Any dependency returned true or not empty result means that a task will be executed, unless a dependency has attribute process_only="yes". exampe
for - define iteration. Attributes specify iteration variable, in interval, and an optional separator to convert scalar interval value in an array. example
if - if statement. Calculate first expression and then execute then block if expression value is true, otherwise else block. else block can be omitted. example
block - allows to combine different statements in one batch. example
else - else branch inside if, since 1.1
then - then branch inside if, since 1.1
elseif - else branch inside if starting a new if block, since 1.1
condition - if condition, since 1.1
echo - displays a value or a variable on console. Two options are available, as  -n do not output the trailing newline, and -E disable interpretation of escape sequences in Strings
switch - provides switch, attribute variable defines a value which checked against attribute value of case blocks. A default block is executed when no one other block matches.. example
function - calls a function, see predefined functions below. Function can be also custom defined. example
parameter - used for specifying parameters for tasks and functions. It acts the same as a value, however it can set system variables with value specified., when used with types environment or property .
operator - executes an operator, see list of available operators below. An operator can be custom defined. example
interrupt - interrupts current context execution, useful for early termination of loops or leaving blocks.

Note that 7Bee is highly expandable language for creation build files, test scripts, and many others tasks. Therefore, set of above statements can be extended by adding new ones. An external grammar definition can be applied without recompiling of any core code.

Clone this wiki locally