Every property of the klok { } extension can be set in build.gradle, as a Gradle property (-P or
gradle.properties) or as an environment variable. The order is the build script, then the environment variable, then
the Gradle property, then the default (KlokExtension.resolveConvention). The other settings of the plugin
(klokAgents*, klokGitAuthToken, klokKnowledge and the like) are read the other way round: the Gradle property
first, then the environment variable.
| Property | Gradle property / environment variable | Default | Used for |
|---|---|---|---|
tenant |
klokTenant / KLOK_TENANT |
default-tenant |
group id, repository names, documentation facts, the tenant catalog (default-tenant means none; then CI_PROJECT_ROOT_NAMESPACE, else the root group of CI_PROJECT_PATH). The documentation payload and klokTopics prefer klok.tenant in application.properties over the placeholder (Broker topics); klokSolutionCheck takes CI_PROJECT_ROOT_NAMESPACE first, then klok.tenant (Solution ids) |
domain |
klokDomain / KLOK_DOMAIN |
default-domain |
documentation facts. default-domain means none: the documentation payload then states klok.domain from application.properties; klokTopics always takes klok.domain first and uses this value only when that key is missing |
projectType |
klokProjectType / KLOK_PROJECT_TYPE |
APPLICATION |
dependency bundle, group id, repository name segment (ProjectType of klok-common); INTEGRATION and APPLICATION are versioned by their commit time and built reproducibly, DATAMODEL and OTHER by their build time |
projectVisibility |
klokProjectVisibility / KLOK_PROJECT_VISIBILITY |
TENANT |
PUBLIC, TENANT, DOMAIN, SYSTEM: the repository and Maven Central publishing (PUBLIC). Who reads the project's documentation on docs.klok.dev is not set here but in its documentation project's klok-documentation-settings.json |
projectDesc |
klokProjectDesc / KLOK_PROJECT_DESC |
My Klok Project Description |
POM and documentation |
majorVersion, minorVersion, patchVersion |
klokMajorVersion / KLOK_MAJOR_VERSION ... |
0, 1, 0 |
version |
disableTimestampVersionMetadata |
klokDisableTimestampVersionMetadata / KLOK_DISABLE_TIMESTAMP_VERSION_METADATA |
false |
local builds only; releases always carry the timestamp |
disableJavaDocGeneration |
klokDisableJavaDocGeneration / KLOK_DISABLE_JAVADOC_GENERATION |
false |
skip the javadoc jar |
baseNamespace |
klokBaseNamespace / KLOK_BASE_NAMESPACE |
the project's group | read by nothing. A build that sets no group gets dev.klok.<tenant>.<projectType in lower case> |
gitAuthToken |
unset | read by nothing. The plugin's GitLab requests take the Gradle property klokGitAuthToken, else the environment variable GITLAB_TOKEN, and CI_JOB_TOKEN in CI (Repositories, Catalog update) |
|
repoWebUrl |
klokRepoWebUrl / KLOK_REPO_WEB_URL |
https://example.com/klok |
POM and release links |
maintainer, maintainerEmail |
klokMaintainer / KLOK_MAINTAINER, klokMaintainerEmail / KLOK_MAINTAINER_EMAIL |
placeholders | POM |
projectLicenseName, projectLicenseUrl |
klokProjectLicenseName / ..., klokProjectLicenseUrl / ... |
Apache 2.0 | POM (mandatory for Maven Central) |
scmConnection, scmDeveloperConnection |
derived from the repository URL | POM | |
brokerUrl |
klokBrokerUrl / KLOK_BROKER_SERVICE_URL |
pulsar+ssl://broker.ipaas.se:6651 |
the broker publishKlokDocs sends the documentation payload to (Documentation tasks) |
projectDisplayName |
klokProjectDisplayName / KLOK_PROJECT_DISPLAY_NAME |
the project name | POM name |
In CI the environment variables are exported by the build templates (KLOK_TENANT from the root namespace) and by the
Vault login script, so a project normally sets only projectType, projectVisibility, projectDesc and the three
version numbers.