AssemblyInfoPatcher

A build feature which updates the AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion attributes in AssemblyInfo files under Properties folders. No additional attributes will be added, make sure you have all necessary attributes in the source code. Changed source files are reverted at the end of a build.

Example. Updates AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion attributes version formats. Also updates versions in GlobalAssemblyInfo

buildType {
// Other Build Type settings ...
features {
// Other Build Features ...
        assemblyInfoPatcher {
assemblyFormat = "1.0.0.%system.build.number%-rc"
fileFormat = "1.0.0.%system.build.number%-rc"
infoFormat = "1.0.0 RC"
patchGlobalAssemblyInfo = true
}




}
}




See also

Constructors

Link copied to clipboard
constructor(init: AssemblyInfoPatcher.() -> Unit)
constructor()

Properties

Link copied to clipboard
var assemblyFormat: <Error class: unknown class>

Assembly version format to update AssemblyVersion attribute.

Link copied to clipboard

Specifies whether the feature is enabled, true by default

Link copied to clipboard
var fileFormat: <Error class: unknown class>

Assembly file version format to update AssemblyFileVersion attribute. Leave blank to use same version as specified in assembly version.

Link copied to clipboard
var id: String?

Build feature id, if not specified will be generated

Link copied to clipboard
var infoFormat: <Error class: unknown class>

Assembly informational version format to update AssemblyInformationalVersion attribute. Leave blank to leave attribute unchanged.

Link copied to clipboard
Link copied to clipboard
var patchGlobalAssemblyInfo: <Error class: unknown class>

If true, AssemblyInfoPatcher will attempt to patch GlobalAssemblyInfo files.

Link copied to clipboard

Build feature type

Functions

Link copied to clipboard
fun booleanParameter(customName: String? = null, trueValue: String? = "true", falseValue: String? = "false"): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun clear()
Link copied to clipboard
fun <T : CompoundParam<T>> compoundParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun <T : Parametrized> copyParamsTo(target: T): T

Copies parameters of this object to the specified target

Link copied to clipboard
open fun create(): BuildFeature

Creates an instance of this build feature via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.

Link copied to clipboard
fun doubleParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun <E : Enum<E>> enumParameter(customName: String? = null, mapping: Map<E, String?>? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun findRawParam(paramName: String): Parameter?
Link copied to clipboard
fun hasParam(paramName: String): Boolean
Link copied to clipboard
fun intParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun param(name: String, value: String)

Adds parameter with specified name and value

Link copied to clipboard
fun removeRawParam(paramName: String)
Link copied to clipboard
open fun stringParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun validate(consumer: ErrorConsumer)

Validates this object and reports found errors to the provided consumer