@AppVersion()

New in 2.0

Generate application versions (format: major.minor.patch[-releaseState][+buildstate])

Network InformationSince 2.0.0

Parameters

NameTypeRequiredDefaultDescription
prefixDictStringVersion prefix (e.g., "v", "wchat"), default none
releaseStateDictStringRelease state dictionary (e.g., SNAPSHOT, BETA, RELEASE)
buildStateDictStringBuild state dictionary (e.g., build.1, build.2)

Usage

@AppVersion()

Generate application version using default dictionaries

Example:
@AppVersion()
Output:
135.50.149199.31.103
@AppVersion(prefixDict)

Generate version with specified prefix, no release/build state

Example:
@AppVersion(v|wchat)
Output:
v-74.153.115m-223.100.154
@AppVersion(prefixDict,releaseStateDict)

Generate version with specified prefix and release state

Example:
@AppVersion(v|wchat,SNAPSHOT|BETA|RELEASE)
Output:
v-237.22.12-SNAPSHOTm-110.126.74-BETA
@AppVersion(prefixDict,releaseStateDict,buildStateDict)

Generate version with specified prefix, release state, and build state

Example:
@AppVersion(v|wchat,SNAPSHOT|BETA|RELEASE,build.1|build.2)
Output:
v-78.225.93-BETA+build2m-250.204.99-RELEASE+build1
← Back to Function Reference