The ABLCompile task compiles ABL code.

Methods

Method Description Example
exclude(String... excludes) Adds an ANT-style exclude pattern to this task. exclude('**/*.txt', '**/*.conf')
include(String... includes) Adds an ANT-style include pattern to this task. include('**/*.p', '**/*.cls')
source(String... sources) Adds a source to this task after the include and exclude patterns are applied. Sources can have an absolute or relative path to the root directory. source('src1', 'src2')
propath(String... propaths) Sets the AVM's PROPATH. This method will be appended to the PROPATHs provided in ABLExtension 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(Closure connection) Adds database configurations to this task. dbConnection{ dbName = 'sports2000' connectionParameters='-S 8000'}
dbConnectionReferenceId(String... refIds)

Adds database task references.

See the id property of DBConnection for more information.

You must add the database tasks' dependency to this task.

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

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

See the compileOptions section for more information.

compileOptions{ multiCompile.enabled=true outputType="json"}
arguments(Map args)

Additional arguments. These arguments are directly passed to PCT.

arguments([k1:"v1", k2:'v2'])

Properties

Property Required? Description Example Default value
openedgeVersion No (read-only property) Prints 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="path" rcodeDir set in ABLExtension.
propath No Sets the PROPATH. propath = files('path1', "${dlcHome}/path2") propath set in ABLExtension
wrkDir No Sets the working directory. wrkDir = 'path' wrkDir set in ABLExtension
avmOptions{} No

AVM options. See the avmOptions section for more information.

None avmOptions set in ABLExtension.
compileOptions{} No Compile options. See the compileOptions section for more information. None compileOptions set in ABLExtension.
arguments No

Additional arguments. These arguments are directly passed to PCT.

arguments = [k1:"v1", k2:'v2'] None

avmOptions{}

Property Description Example Default value
tmpDir The temporary directory for the AVM run time. -T is the startup parameter option. tmpDir = 'path1' None
tty.enabled The flag for using the _progres or prowin executables. Set to true for _progres, set to false for prowin (or prowin32 for a 32-bit AVM). tty { enabled = ‘true’ } true
xcodeSessionKey The XCODE session key for the secuity policy. xcodeSessionKey='myKey' None
parameterFile The parameter file. -pf is the startup parameter option. parameterFile='pathToFile' None
startupParameters The startup parameters as a string. This will be ignored if a parameterFile is provided startupParameters='-tok 4000 -s 200' None
assembliesDir The assemblies directory. -assemblies is the startup parameter option. assembliesDir='path1' None

compileOptions{}

Property Description Example Default value
xrefDir The path where xref will be generated. xrefDir='xref2' '${buildDir}xref'
debugListDir The path where the debug listing will be generated. debugListDir='debugList2' '${buildDir}/debugList'
preprocessDir The path where the preprocess output will be generated. preprocessDir='preprocess2' '${buildDir}/preprocess'
multiCompile.enabled The COMPILER:MULTI-COMPILE attribute multiCompile.enabled=true false
strictOptions. requireFullNames Specifies that the options require full names in the COMPILE statement. Value can be ignore or error. strictOptions.requireFullNames='error' ignore
strictOptions. requireFieldQualifiers Specifies that the options require field qualifiers in the COMPILE statement. Value can be ignore or error. strictOptions.requireFieldQualifiers='error' ignore
strictOptions. requireFullKeywords Specifies that the options require full keywords in the COMPILE statement. Value can be ignore or error. strictOptions.requireFullKeywords='error' ignore
strictOptions. requireReturnValues Specifies that the options require return values in the COMPILE statement. Value can be ignore or error. strictOptions.requireReturnValues='error' ignore
listing.enabled The LISTING option in the COMPILE statement listing.enabled=true false
xcodeKey The XCODE option in the COMPILE statement. Specify the expression as a string. xcodeKey='myKey' None
xref.enabled The XREF option in COMPILE statement xref.enabled=true false
xrefXml.enabled The XREF-XML option in the COMPILE statement. To enable this option, set the value to true. xrefXml.enabled=true false
xrefString.enabled The STRING-XREF option in the COMPILE statement xrefString.enabled=true false
xrefString.append The APPEND option in STRING-XREF xrefString.append=true false
streamIO.enabled The STREAM-IO option in the COMPILE statement. To enable this option, set the value to true. streamIO.enabled=true false
languages.list This is a comma-separated list of language segments to include in the compiled r-code. languages.list='lang1,lang2' None
languages.textSegGrow The TEXT-SEG-GROW option. Set the growth-factor as an integer. Supported only when a language list is provided. languages.textSegGrow=10 None
debugList.enabled The DEBUG-LIST option in the COMPILE statement debugList.enabled=true false
preprocess.enabled The PREPROCESS option in the COMPILE statement preprocess.enabled=true false
v6Frame.enabled The V6FRAME option in the COMPILE statement v6Frame.enabled=true false
v6Frame.useRevVideo The USE-REVVIDEO option in V6FRAME v6Frame.useRevVideo=true false
v6Frame.useUnderline The USE-UNDERLINE option in V6FRAME v6Frame.useUnderline=true false
minSize.enabled The MIN-SIZE option in the COMPILE statement. To enable this option, set the value to true. minSize.enabled=true false
outputType Use this option to change the output format. Available options are: json outputType='json' None

Sample code snippet

The following code snippet is an example using ABLCompile:
abl{
    propath("${dlcHome}/tty/")
    avmOptions {}
    compileOptions{}
    rcodeDir='rcode1'
    wrkDir = "myWrkDir"
     
    dbConnection{
        dbName = 'sports2000'
        connectionParameters='-S 8000'
    }
}
 
task myDbConTask(type: DBConnection){
    id='id1'
    dbName='sports2020'
    parameterFile='pathToFile'
    aliases = ['alias1', 'alias2', 'aalias3']
}
 
task myCompileTask(type: ABLCompile){
    println "OE version: ${openedgeVersion}"
 
    source('src1', 'src2')
    include('**/*.p', '**/*.cls')
    exclude('**/*.txt', '**/*.conf')
    rcodeDir='rcode1'
    propath('path1', "${dlcHome}/path2")
    wrkDir = 'path1'
    avmOptions{
        tty.enabled='true'
        startupParameters='-tok 4000 -s 200'
    }
    compileOptions{
        xrefDir='xref2'
        preprocessDir=""
        preprocess.enabled=""
        strictOptions{
            requireFullNames='warning'
        }
        outputType='json'
    }
     
    dbConnection{
        dbName = 'sports2020'
        parameterFile='pathToParameterFile'
        connectionParameters='-S 8000'
        port = '8000'
        host = 'localhost'
        username = 'admin'
        password = 'admin2'
        aliases = ['a1', 'a2']
    }
    dbConnectionReferenceId("id0")
    dbConnectionReferenceId("id1", "id2")
}
 
myCompileTask.dependsOn myDbConTask