Products Downloads


French version


 

List of Gradle tasks for the Adelia build

adelAppInit

This task initializes the build project by creating the necessary framework to enable artifacts to be generated, based on the list of Adelia application area names declared in the adelLstAppArea key in the gradle.properties file.

 

The following diagram shows the result of the task with the adelAppName=sampleApp and adelLstAppArea=APP_AREA_1 APP_AREA_2 keys.

The subdirectories, named after application areas, will contain the artifacts for Adelia objects that have private visibility.

Similarly, the _Commons subdirectory will contain the artifacts for Adelia objects that have public visibility.

 

The following diagram shows the structural details of an "application area name" directory (APP_AREA_1 in this example).

The _Commons directory associated with objects with public visibility has the same structure.

 

Each "application area name" subdirectory contains a location in which to build the various types of artifacts.

A location may be empty if no objects corresponding to a particular type of artifact exist in the Adelia application area.

 

adelAppCreateAS400Lib

This task creates (in the environment attributes on the declared AS400) the necessary libraries enabling Adelia objects to be generated in order to build As400Adelia and As400Server artifacts.

The libraries thus created are those defined via the adelGenAS400.as400Adelia.genLib and adelGenAS400.as400Server.genLib keys in the gradle.properties file.

 

adelAppClean

This task deletes the directory with the name of the application being built, as well as the AS400 libraries specified for the purpose of building As400Adelia and As400Server artifacts (the library names are defined via the adelGenAS400.as400Adelia.genLib and adelGenAS400.as400Server.genLib keys in the gradle.properties file).

The build project is cleared and you must execute the adelAppInit task again to initialize it.

 

adelAppGenerate

This task launches the Adelia process that generates the objects belonging to the application areas defined by the adelLstAppArea key for the environment defined by the adelEnvName key.

The number of objects generated depends on the generation mode (value of the adelGenIncremental key):

  • All objects if Global mode is set,

  • Only objects modified since the previous build if Incremental mode is set,

In both modes, if the Adelia generation process returns an error for an object, the other objects are still generated but the build is halted at the adelAppGenerate task.

 

Note: If an Adelia object generated during a previous build has been removed from the repository, the adelAppGenerate task will not delete the binary objects resulting from the previous generation and those binary objects will be included in the artifact when it is built.

 

Upon completion of this task, the files produced during the generation process are placed in the following directories:

Example build configured with adelAppName=sampleApp and adelLstAppArea=APP_AREA_1

Artifact type

Target directory in which files produced by the generation process are placed

Artifact type

As400Adelia

In the AS400 libraries defined by the adelGenAS400.as400Adelia.genLib key and the adelGenAS400.language key

 

As400Server

In the AS400 libraries defined by the adelGenAS400.as400Server.genLib key and the adelGenAS400.language key

 

Cloud

sampleApp\APP_AREA_1\APP_AREA_1_Cloud\src\main

sampleApp\APP_AREA_1\APP_AREA_1_Cloud\src\s<X> (where X is a numerical value)

The generation process produces the .java source files and the resource files. Java files are compiled by the adelAppBuild task.

CloudSelenium

sampleApp\APP_AREA_1\ APP_AREA_1_CloudSelenium\src\main

sampleApp\APP_AREA_1\ APP_AREA_1_CloudSelenium\src\s<X> (where X is a numerical value)

The generation process produces the .java source files. These files are compiled by the adelAppBuild task.

CrystalReportsCloud

sampleApp\APP_AREA_1\APP_AREA_1_CrystalReportsCloud

Contains the Crystal Reports template files (.RPT files) produced during Cloud generation of programs with reports

CrystalReportsWeb

sampleApp\APP_AREA_1\APP_AREA_1_CrystalReportsWeb

Contains the Crystal Reports template files (.RPT files) produced during Web generation of programs with reports

JavaClient

sampleApp\APP_AREA_1\APP_AREA_1_JavaClient\src\main

sampleApp\APP_AREA_1\APP_AREA_1_JavaClient\src\s<X> (where X is a numerical value)

The generation process produces the .java source files and the resource files. Java files are compiled by the adelAppBuild task.

JavaServer

sampleApp\APP_AREA_1\APP_AREA_1_JavaServer\src\main

sampleApp\APP_AREA_1\APP_AREA_1_JavaServer\src\s<X> (where X is a numerical value)

The generation process produces the .java source files and the resource files. Java files are compiled by the adelAppBuild task.

Pojo

sampleApp\APP_AREA_1\APP_AREA_1_Pojo\src\main

sampleApp\APP_AREA_1\APP_AREA_1_Pojo\src\s<X> (where X is a numerical value)

The generation process produces the .java source files. These files are compiled by the adelAppBuild task.

Web

sampleApp\APP_AREA_1\APP_AREA_1_Web\src\main

sampleApp\APP_AREA_1\APP_AREA_1_Web\src\s<X> (where X is a numerical value)

The generation process produces the .java source files and the resource files. Java files are compiled by the adelAppBuild task.

WinClient

sampleApp\APP_AREA_1\APP_AREA_1_WinClient\src

sampleApp\APP_AREA_1\APP_AREA_1_WinClient\obj

The generation process produces the Windows source files (in the src directory) as well as the binary objects produced by the C compilation (obj directory)

WinServer

sampleApp\APP_AREA_1\APP_AREA_1_WinServer\src

sampleApp\APP_AREA_1\APP_AREA_1_WinServer\obj

The generation process produces the Windows source files (in the src directory) as well as the binary objects produced by the C compilation (obj directory)

WSRest

sampleApp\APP_AREA_1\APP_AREA_1_WSRest\src\main

The generation process produces the .java source files and the resource files. Java files are compiled by the adelAppBuild task.

WSSoapAar

sampleApp\APP_AREA_1\APP_AREA_1_WSSoapAar\arc\main

The generation process produces the .java source files and the resource files. Java files are compiled by the adelAppBuild task.

WSSoapJar

sampleApp\APP_AREA_1\APP_AREA_1_WSSoapJar\src\<WebServicename>

The generation process produces the .java source files and the resource files. Java files are compiled by the adelAppBuild task.

Table 2: Generation path of the files needed for building the generated artifacts.

 

adelAppBuild

This is the main task in an Adelia build. It is divided into two phases:

  1. The adelAppGenerate task is called to execute the Adelia generation process,

  2. The files produced by phase 1 are processed to create the related artifacts.

 

At the end of phase 2, the generated artifacts are placed in the following directories:

Example build configured with adelAppName=sampleApp, adelLstAppArea=APP_AREA_1, adelGenAS400.language=SPANISH[APP_AREA_1 TSTBLDESPR],ENGLISH[APP_AREA_1 TSTBLDUKPR] and version=1.0.0-SNAPSHOT

Artifact type

Target directory in which files produced by the generation process are placed

Artifact type

As400Adelia

sampleApp\APP_AREA_1\APP_AREA_1_As400Adelia\obj\pgm

sampleApp\APP_AREA_1\APP_AREA_1_As400Adelia\obj\intl\SPANISH

sampleApp\APP_AREA_1\APP_AREA_1_As400Adelia\obj\intl\ENGLISH

sampleapp-app_area_1_as400adelia-1.0.0-SNAPSHOT.zip

sampleapp-app_area_1_as400adelia_spanish-1.0.0-SNAPSHOT.zip

sampleapp-app_area_1_as400adelia_english-1.0.0-SNAPSHOT.zip

As400Server

sampleApp\APP_AREA_1\APP_AREA_1_As400Server\obj\pgm

sampleApp\APP_AREA_1\APP_AREA_1_As400Server\obj\intl\SPANISH

sampleApp\APP_AREA_1\APP_AREA_1_As400Server\obj\intl\ENGLISH

sampleapp-app_area_1_as400server-1.0.0-SNAPSHOT.zip

sampleapp-app_area_1_as400server_spanish-1.0.0-SNAPSHOT.zip

sampleapp-app_area_1_as400server_english-1.0.0-SNAPSHOT.zip

Cloud

sampleApp\APP_AREA_1\APP_AREA_1_Cloud\build\libs

sampleapp-app_area_1_cloud-1.0.0-SNAPSHOT.jar

CloudSelenium

sampleApp\APP_AREA_1\APP_AREA_1_CloudSelenium\build\libs

sampleapp-app_area_1_cloudselenium-1.0.0-SNAPSHOT.jar

CrystalReportsCloud

sampleApp\APP_AREA_1\APP_AREA_1_CrystalReportsCloud\build

sampleapp-app_area_1_crystalreportscloud-1.0.0-SNAPSHOT.zip

CrystalReportsWeb

sampleApp\APP_AREA_1\APP_AREA_1_CrystalReportsWeb\build

sampleapp-app_area_1_crystalreportsweb-1.0.0-SNAPSHOT.zip

JavaClient

sampleApp\APP_AREA_1\APP_AREA_1_JavaClient\build\libs

sampleapp-app_area_1_javaclient-1.0.0-SNAPSHOT.jar

JavaServer

sampleApp\APP_AREA_1\APP_AREA_1_JavaServer\build\libs

sampleapp-app_area_1_javaserver-1.0.0-SNAPSHOT.jar

Pojo

sampleApp\APP_AREA_1\APP_AREA_1_Pojo\build\libs

sampleapp-app_area_1_pojo-1.0.0-SNAPSHOT.jar

Web

sampleApp\APP_AREA_1\APP_AREA_1_Web\build\libs

sampleapp-app_area_1_web-1.0.0-SNAPSHOT.jar

WinClient

sampleApp\APP_AREA_1\APP_AREA_1_WinClient\build

sampleapp-app_area_1_winclient-1.0.0-SNAPSHOT.zip

WinServer

sampleApp\APP_AREA_1\APP_AREA_1_WinServer\build

sampleapp-app_area_1_winserver-1.0.0-SNAPSHOT.zip

WSRest

sampleApp\APP_AREA_1\APP_AREA_1_WSRest\build\libs

sampleapp-app_area_1_wsrest-1.0.0-SNAPSHOT.jar

WSSoapAar

sampleApp\APP_AREA_1\APP_AREA_1_WSSoapAar\build\libs

sampleapp-app_area_1_wssoapaar-1.0.0-SNAPSHOT.aar

WSSoapJar

sampleApp\APP_AREA_1\APP_AREA_1_WSSoapJar\build\libs

sampleapp-app_area_1_wssoapjar-1.0.0-SNAPSHOT.zip

Table 3: Description of the generated debug artifact files

 

For Java artifacts, the .java source files are compiled (by the adelAppBuild task) using the compilation options defined in the adeliws.ini file.

 

Furthermore, if the value of the build parameter adelCreateSourceFilesArtifacts is Y, 3GL sources artifacts are generated in addition to the main artifacts described above:

 

Example build configured with adelAppName=sampleApp, adelLstAppArea=APP_AREA_1 and version=1.0.0-SNAPSHOT

Artifact type

Generated file destination directory

Name of the generated file

Cloud

sampleApp\APP_AREA_1\APP_AREA_1_Cloud\build\libs

sampleapp-app_area_1_cloud-1.0.0-SNAPSHOT-sources.jar

CloudSelenium

sampleApp\APP_AREA_1\APP_AREA_1_CloudSelenium\build\libs

sampleapp-app_area_1_cloudselenium-1.0.0-SNAPSHOT-sources.jar

JavaClient

sampleApp\APP_AREA_1\APP_AREA_1_JavaClient\build\libs

sampleapp-app_area_1_javaclient-1.0.0-SNAPSHOT-sources.jar

JavaServer

sampleApp\APP_AREA_1\APP_AREA_1_JavaServer\build\libs

sampleapp-app_area_1_javaserver-1.0.0-SNAPSHOT-sources.jar

Pojo

sampleApp\APP_AREA_1\APP_AREA_1_Pojo\build\libs

sampleapp-app_area_1_pojo-1.0.0-SNAPSHOT-sources.jar

Web

sampleApp\APP_AREA_1\APP_AREA_1_Web\build\libs

sampleapp-app_area_1_web-1.0.0-SNAPSHOT-sources.jar

WinClient

sampleApp\APP_AREA_1\APP_AREA_1_WinClient\build

sampleapp-app_area_1_winclient-1.0.0-SNAPSHOT-sources.zip

WinServer

sampleApp\APP_AREA_1\APP_AREA_1_WinServer\build

sampleapp-app_area_1_winserver-1.0.0-SNAPSHOT-sources.zip

WSRest

sampleApp\APP_AREA_1\APP_AREA_1_WSRest\build\libs

sampleapp-app_area_1_wsrest-1.0.0-SNAPSHOT-sources.jar

WSSoapAar

sampleApp\APP_AREA_1\APP_AREA_1_WSSoapAar\build\libs

sampleapp-app_area_1_wssoapaar-1.0.0-SNAPSHOT-sources.jar

WSSoapJar

sampleApp\APP_AREA_1\APP_AREA_1_WSSoapJar\build\libs

sampleapp-app_area_1_wssoapjar-1.0.0-SNAPSHOT-sources.jar

Table 4: Description of the sources artifact files produced

 

 Furthermore, if the value of the build parameter adelGenDebugMod is Y, debug artifacts are generated in addition to the main artifacts described above:

Example build configured with adelAppName=sampleApp, adelLstAppArea=APP_AREA_1 and version=1.0.0-SNAPSHOT

Artifact type

Generated file destination directory

Name of the generated file

Cloud

sampleApp\APP_AREA_1\APP_AREA_1_Cloud\build\distributions

sampleapp-app_area_1_clouddbg-1.0.0-SNAPSHOT.zip

JavaClient

sampleApp\APP_AREA_1\APP_AREA_1_JavaClient\build\distributions

sampleapp-app_area_1_javaclientdbg-1.0.0-SNAPSHOT.zip

Web

sampleApp\APP_AREA_1\APP_AREA_1_Web\build\distributions

sampleapp-app_area_1_webdbg-1.0.0-SNAPSHOT.zip

WinClient

sampleApp\APP_AREA_1\APP_AREA_1_WinClient\build

sampleapp-app_area_1_winclientdbg-1.0.0-SNAPSHOT.zip

WSRest

sampleApp\APP_AREA_1\APP_AREA_1_WSRest\build\distributions

sampleapp-app_area_1_wsrestdbg-1.0.0-SNAPSHOT.zip

WSSoapAar

sampleApp\APP_AREA_1\APP_AREA_1_WSSoapAar\build\distributions

sampleapp-app_area_1_wssoapaardbg-1.0.0-SNAPSHOT.zip

WSSoapJar

sampleApp\APP_AREA_1\APP_AREA_1_WSSoapJar\build\distributions

sampleapp-app_area_1_wssoapjardbg-1.0.0-SNAPSHOT.zip

  Table 5: Description of the debug artifact files produced

 

uploadArchives

This task transfers the built artifacts to the upload repository.

You must specify the uploadArchivesReleaseRepo or uploadArchivesSnapshotRepo key, depending on the version type of the artifacts.

This task must be called after the adelAppBuild task.

↑ Top of page

 


Dependency of Gradle tasks for the Adelia build

The following table shows the inputs and dependent tasks for each build task.

Task name

Dependent on

Description

adelAppInit

adelAppName key, adelLstAppArea key

Initializes the Adelia build project.

adelAppCreateAS400Lib

adelGenAS400.as400Adelia.genLib key, adelGenAS400.as400Server.genLib key

Creates the AS400 libraries defined in gradle.properties.

adelAppClean

 

Clears the build project.

adelAppGenerate

adelAppInit task, adelAppCreateAS400Lib task

Launches the Adelia generation process.

adelAppBuild

adelAppGenerate task

Creates the Adelia artifacts.

uploadArchives

version key, uploadArchivesReleaseRepo key, uploadArchivesShapshotRepo key

Transfers the versioned artifacts to a repository.

↑ Top of page


Launches a build via a command line

The build is launched in several steps, as described below:

  1. Open a DOS command window with an administrator profile,

  2. Navigate to the directory containing the build project,

  3. Run the following command, based on your choices relating to the generation mode and the storage of artifacts in a repository:

Adelia generation mode

Transfer artifacts to repository

 

YES

NO

Global (1)

gradlew adelAppClean adelAppBuild uploadArchives

gradlew adelAppClean adelAppBuild

Incremental (2)

gradlew adelAppBuild uploadArchives

gradlew adelAppBuild

(1)  : adelGenIncremental=N

(2)  : adelGenIncremental=Y

 

Notes:

    • Calling the adelAppClean task in global mode ensures consistency between the content of an artifact and the generated Adelia objects (for example, if an Adelia object deleted between two builds),
    • If incremental mode is enabled and the adelAppClean task has been executed, the next build executed in incremental mode will have its mode forced to Global instead,
    • As Gradle provides task dependency and task input caching mechanisms, calling the adelAppBuild task will trigger the adelAppInit (project initialization) task in the following cases:
      • When the Adelia build is launched for the first time,
      • If the name of the application to be built (adelAppName parameter) or the list of Adelia application area to be generated (adelLstAppArea parameter) has been changed between two builds.

 

↑ Top of page

 

When a build is launched via Jenkins.

The online help is based on Jenkins version 2.66 and the Gradle plugin for Jenkins version 1.27.1.

In a continuous integration approach, Jenkins can be used to run and sequence jobs automatically.

You can define a job as an Adelia build in order to launch it via Jenkins.

There are two ways to do this, as described below.

 

Adelia build via a command line

When configuring the job, open the Build section and add a step to the build using the "Execute Windows batch command" option. You can enter a series of commands in DOS Batch format, which will then be executed sequentially; for example:

cd /d "D:\build"

call gradlew adelAppClean adelAppBuild uploadArchives

 

Adelia build via the Gradle plugin

When configuring the job, open the Build section and add a step to the build using the "Invoke Gradle script" option: select the "Use Gradle Wrapper" radio button and then configure the "Wrapper location" field (enter the path to the project containing the gradlew.bat file - in our example, D:\build) and the "Task" field (enter the list of Gradle tasks to be executed - in our example, adelAppClean adelAppBuild uploadArchives).

Additionally, you must specify the build project root directory. To do this, click the Advanced button and specify the "Root Build script" field (in our example, D:\build).

 

↑ Top of page


  • Aucune étiquette