Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Configuring project defaults

zerovian edited this page Jun 28, 2019 · 4 revisions

A task named "abl" is provided where default configuration can be supplied. These defaults will apply to all tasks that support the named property. For example, PCTRun supports, propath, env, and database connections that can be specified at the default level.

Configuring default PROPATH

   abl {
     // Example PROPATH that includes bin and src directories 
     propath = files(['bin', 'src'])
   }

Configuring default OpenEdge installation directory.

You can specify the default openedge installation directory. If not specified, then it defaults back to the environment variable value of DLC. The value is required to be a valid directory.

    abl {
        dlcHome = new File("$System.env.DLC")
    }

This will specify the dlcHome value for all tasks that do not specify the dlcHome property. You can override the dlcHome for each individual task, by setting the dlcHome property for the task.

task runAbl(type : RunAbl) {
    dependsOn connectDB

    procedure = file("src/abl/ablrun.p").path

    dbConnections << 'sports2020'
    dlcHome = new File("c://progress/openedge120")

Configuring default rcode destination directory

You can specify the destination directory for where r-code is saved during a compile. You can configure this per task, or set it as a global default.

    abl {
        rcodeDir= "${buildDir}/rcode"
    }

Configuring environment variables

A set of default Environment variables can be configured for all tasks provided by the plugin. These are a default set, and task configurations can add additional environment variables, or replace all of the defaults. These environment variables are passed to any invocation of _progress, _proserve, or other executables that are run externally.

abl {
   environment = ["bob", "marley"]
}

Here is an example of overwriting an environment variables to an ABL run task that may have a default set.

task runAbl(type : RunAbl) {
    dependsOn connectDB

    procedure = file("src/abl/ablrun.p").path

    dbConnections << 'sports2020'

    env("bob", "ross")
}