To build an ABL project, the ABL Plugin provides various tasks. For example, a task to compile ABL sources by default, based on the project’s propath (.propath file) and properties (build.config file).

You can refer to the Understand the build process of an ABL project topic to understand in greater details about various stages of a project build.

By default, a project consists of the following tasks:
  • Build
  • compileAbl
  • dbConnections
  • clean
  • cleanTaskName
This image shows the relationship between the tasks:

build (lifecycle task)

This task is used to build a project and relies on the compileAbl task. Currently, the build task only compiles the project and generates the r-code. In future, it will do all other necessary thingsx` needed for building the project.

compileAbl

The compileAbl task compiles an ABL project. It compiles the ABL sources for all the sourcepath entries defined in the propath file. This task has dependsOn dependency on the <src-entry-tasks>.

In a scenario, where you run the compileAbl task with more than one <src-entry-tasks> and if one of them fails due to a compilation error or otherwise, then the other <src-entry-tasks> will fail to run. This is the default Gradle behavior where if one dependent task fails the the other tasks are not run.

Note: Use --continue to get complete feedback on compilations errors for all the src-entries. For example:
$gradle compileAbl --continue

<src-entry-tasks>

A task (of type ABLCompile) is created to compile ABL sources for each sourcepath entry (kind=src) defined in the propath file.

The name of the task follows the convention compileAbl-root-<subpath-path-from-root>. For example for a sourcepath, @{ROOT}/src, the task name would look like compileAbl-root-src.

When compiling the sources, you may prefer to configure these tasks for various options as described in the Compile source code section.

Follow these steps to configure the task:
  • AVM configurations
    • Use Propath file or refer to Dependency Management to provide PROPATH specific dependencies.
    • Use Build Config file to configure database connection details. A dbConnections task is created to hold these connection details. All these <src-entry-tasks> have dependsOn dependency on the dbConnections task.
    • Use Build Config file to configure AVM parameters.
  • Compile configurations
Note: You can also use the global configurations, described in the ABL base plugin section, to configure various properties of the tasks. However, you might not always have a requirement to do so.

generateCompileAblResultJson

Generates a unified result of the JSON output of different tasks. This output is used when the property outputType is set in compileOptions.

dbConnections

Holds ABL database connection details that are defined in the config file. A task (of type DBConnection) is created for each connection entry provided in the Build Config file.

clean

Cleans the project by removing the build output. Run this task first if you want to re-build the project in a clean environment.

cleanTaskName

Deletes files created by the specified task. For example, cleanCompileAbl deletes the r-code files and any other output files generated by the compileAbl task.