This extension is a set of ABL language-specific configurations that are available to all task types.

Methods

Method Description Example
propath Sets the AVM's PROPATH. propath('path1', "${dlcHome}/path2")
avmOptions(Closure avmOptions)

AVM options. The argument should be provided as a closure.

See avmOptions in the ABLCompile section for more information.

avmOptions{ tmpDir="path" tty.enabled=true }
dbConnection({})

Adds database configurations.

See the ABLCompile section for more information.

dbConnection{ dbName = 'sports2000' connectionParameters='-S 8000'}
dbConnectionReferenceId(String... refIds)

Adds database task references.

See the id property of DBConnection for more information.

dbConnectionReferenceId("id1", "id2")
compileOptions(Closure compileOptions)

Compile options. The argument should be provided as a closure.

See compileOptions in the ABLCompile section for more information.

compileOptions{ multiCompile.enabled=true outputType="json"}

Properties

Property Required? Description Example Default value
dlcHome

Yes (read-only property)

The OpenEdge DLC path. This property can be set in the following ways:
  1. Set DLC as a system property (-DDLC=<dlCPath> set on the command line)
  2. Set DLC as a Gradle property (DLC=<dlCPath> set in gradle.properties file )
  3. Set DLC as an environment variable

The order of priority is 1 > 2 > 3.

None None
openedgeVersion No (read-only property) Specifies the OpenEdge version. This can be used for logging. This is a read-only property. None None
rcodeDir No Sets the directory where the r-code will be generated. rcodeDir="rcode2" or rcodeDir="path" ${buildDir}/rcode
propath No Sets the AVM's PROPATH. propath = files('path1', "${dlcHome}/path2") None
wrkDir No Sets the working directory. wrkDir = 'path1' "${projectDir}".
avmOptions{} No

AVM options.

Use the method avmOptions(Closure closure) to set the properties.

None None
dbConnections No

Database connection details.

To add a database connection, use methods, dbConnection(Closure connection) or dbConnectionReferenceId(String... refIds).

None None
compileOptions{} No

Compile options.

See the ABLCompile section for more information.

None None

Sample code snippet

The following code snippet is an example using ABLExtension:
abl{
    rcodeDir='${buildDir}/myRcode'
    wrkDir = "."
    propath("${dlcHome}/tty/")
    avmOptions{
        tmpDir="${buildDir}"
        tty.enabled=true
    }
    compileOptions{
        multiCompile.enabled=true
        outputType="json"
    }  
    dbConnection{
        dbName = 'sports2000'
        connectionParameters='-S 8000'
    }
    dbConnectionReferenceId("id1", "id2")
}