Skip to main content

The properties definitions

Purpose

Define the values used as variables in the LiquidJS substitutions.

Syntax

{
...
"properties": {
...
"<property name>": "<property value>",
...
}
}

The value of properties is a map of string definitions.

Description

The properties map is used to define string properties that can be used as substitution variable in other definitions.

properties can be defined on top of other properties, and the LiquidJS engine will be invoked repeatedly until all substitutions are performed.

When substitutions occur within a build configuration, the properties defined in the build configuration take precedence over properties with the same name defined at the project level.

Examples

Project properties:

{
"xpack": {
"properties": {
"buildFolderRelativePath": "{{'build' | path_join: configuration.name | to_filename | downcase}}",
}
}
}

Build configuration properties:

{
"name": "@xpack-dev-tools/cmake",
"version": "3.28.6-1.1",
"xpack": {
"properties": {
"appLcName": "cmake",
},
"buildConfigurations": {
"common-docker": {
"hidden": true,
"properties": {
"containerName": "{{properties.appLcName}}-{{package.version}}-{{configuration.name}}",
"force32": ""
}
}
}
}
}