32 lines
1.8 KiB
XML
32 lines
1.8 KiB
XML
<Project>
|
|
<PropertyGroup>
|
|
<Nullable>enable</Nullable>
|
|
<AvaloniaVersion>11.1.0</AvaloniaVersion>
|
|
</PropertyGroup>
|
|
|
|
<!-- Centralized app versioning for all projects -->
|
|
<PropertyGroup Label="Versioning">
|
|
<!-- Single source of truth: update these -->
|
|
<AppVersion>1.2.0</AppVersion>
|
|
<PrereleaseLabel></PrereleaseLabel>
|
|
|
|
<!-- Derived semantic version pieces -->
|
|
<AppVersionMajor>$([System.Text.RegularExpressions.Regex]::Match('$(AppVersion)', '^(\d+)\.(\d+)\.(\d+)').Groups[1].Value)</AppVersionMajor>
|
|
<AppVersionMinor>$([System.Text.RegularExpressions.Regex]::Match('$(AppVersion)', '^(\d+)\.(\d+)\.(\d+)').Groups[2].Value)</AppVersionMinor>
|
|
<AppVersionPatch>$([System.Text.RegularExpressions.Regex]::Match('$(AppVersion)', '^(\d+)\.(\d+)\.(\d+)').Groups[3].Value)</AppVersionPatch>
|
|
|
|
<!-- Standard .NET version properties -->
|
|
<VersionPrefix>$(AppVersion)</VersionPrefix>
|
|
<VersionSuffix Condition=" '$(PrereleaseLabel)' != '' ">$(PrereleaseLabel)</VersionSuffix>
|
|
<Version Condition=" '$(PrereleaseLabel)' == '' ">$(VersionPrefix)</Version>
|
|
<Version Condition=" '$(PrereleaseLabel)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
|
|
<AssemblyVersion>$(AppVersionMajor).$(AppVersionMinor).0.0</AssemblyVersion>
|
|
<FileVersion>$(AppVersionMajor).$(AppVersionMinor).$(AppVersionPatch).0</FileVersion>
|
|
<InformationalVersion>$(Version)</InformationalVersion>
|
|
|
|
<!-- Android mapping: versionName + versionCode -->
|
|
<ApplicationDisplayVersion>$(Version)</ApplicationDisplayVersion>
|
|
<!-- VersionCode = major*10000 + minor*100 + patch (e.g., 1.2.3 -> 10203) -->
|
|
<ApplicationVersion>$([MSBuild]::Add($([MSBuild]::Multiply($(AppVersionMajor), 10000)),$([MSBuild]::Add($([MSBuild]::Multiply($(AppVersionMinor), 100)),$(AppVersionPatch)))))</ApplicationVersion>
|
|
</PropertyGroup>
|
|
</Project>
|