Skip to main content
Skip table of contents

Java Development: Build Tasks

The DevKit contains gradle and some prepared gradle build scripts for you to build your library:

gradle_scripts.png

Some of the scripts are just helper scripts or present for compatibility reasons. The following scripts are relevant in the context of this topic:

Script

Description

build

Triggers the complete build process.

Use this script if you want to build the complete library from the source code. It assembles and tests the project (unit tests), generates a ZIP file, and sends it to your PAS system to get the xlib file in return.

The xlib file then is stored to build/distributions.

buildXlib

Triggers the build process without performing the unit tests.

Use this script if you do not need to perform the unit tests.

clean

Triggers a cleaning of the build cache.

Some stages are cached during the build process. A new xUML project ID will be used. Use this script if you are experiencing build errors you cannot find a reason for.

Before triggering a build, configure the gradle settings as described below.

gradle Settings

You can configure gradle via the file gradle.properties. Apart from some general settings, this file mainly configures access to the Git repository (if applicable) and to the asset-repository-service of your PAS installation.

Generally, you should use local.properties to configure authentication related project settings, see Java Development: Setting-up the Development Project. The local properties override the gradle properties for this very project.

You should never add any credentials to the gradle.properties or_local.properties. These files are designated to be checked into Git.

Library Configuration and PAS Access

The build process needs access to your PAS installation, because it uses the asset-repository service to transform the project ZIP file to an xlib file. Also, you need to provide some settings to be compiled to the library:

Setting

Location

Library Version

xibVersion

gradle.properties

Provide the version of the library. The version will be generated to the library.

Company Name

companyName

gradle.properties

Provide your company name to be added to the MANIFEST.MF.

PAS Base URL

pasBaseUrl

gradle.properties

Specify the base URL of your PAS system.

PAS Credentials

oauthUsername
oauthPassword

local.properties

Provide valid credentials of your PAS system for the library build.
The user must be a designer developer as described on Defining a Profile Set for Standard Users in the Administration guide.

All Configurations Overview

Setting

Description

Example

Project Settings

xlibVersion

Provide the version of the library. The version will be generated to the library.

The version of the service must follow Semantic Versioning 2.0.0: Major.Minor.Patch. A pre-release tag is optional. A version numbering that deviates from this will lead to errors.

1.0.0

uploadTimeoutSeconds

Specify an upload timeout in seconds (default is 150). You can increase this value in case you run into timeouts frequently, e.g. for big projects or slow PAS systems.

150

org.gradle.jvmargs

Specify JVM configurations for gradle. You can use this to increase your Java heap space if necessary.

-Xmx1G

PAS System Settings

companyName

Provide your company name to be added to the MANIFEST.MF.

ACME Corp.

pasBaseUrl

Specify the base URL of your PAS system. This is needed during the build process to get the xlib file from the project ZIP via the asset repository service. Authentication is granted by username and password, see oauthUsername and oauthPassword below.

https://acme.saas.pas-cloud.com/pas

oauthUsername

Provide a valid username of your PAS system. This user must be a designer developer as described on Defining a Profile Set for Standard Users in the Administration guide.

meredith.mitchell

oauthPassword

Do not specify this value here but configure this in the local.properties (see Java Development: Setting-up the Development Project).

 

projectResource

Provide the API path to the project within the asset-repository service. This path is relative to the PAS base URL (pasBaseUrl).

Do not change this setting. This only needs to be changed if required by a PAS update.

api/asset-repository-service/compiler/rest/project

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.