Assembly Info Patcher
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
}
Content copied to clipboard }
}
See also
Properties
Assembly version format to update AssemblyVersion attribute.
Assembly file version format to update AssemblyFileVersion attribute. Leave blank to use same version as specified in assembly version.
Assembly informational version format to update AssemblyInformationalVersion attribute. Leave blank to leave attribute unchanged.
If true, AssemblyInfoPatcher will attempt to patch GlobalAssemblyInfo files.
Functions
Copies parameters of this object to the specified target
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.
Validates this object and reports found errors to the provided consumer