Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
101 lines (88 loc) · 5.74 KB
/
Copy pathDirectory.Build.props
File metadata and controls
101 lines (88 loc) · 5.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<Project>
<!--
Shared build/pack settings for every project in the repo (apps, libraries, tests). MSBuild imports
the nearest Directory.Build.props walking up from each csproj, so this covers src/ and tests/ but
NOT any future self-contained module (each such module brings its own Directory.Build.props, which
stops the upward search).
The single product version lives in pub/PubVersion.json (the source of truth the bump edits) and
is mirrored into <Version> below by pub/lib/Update-VersionFile.ps1 on every bump — so apps and libraries
always share one version. CI can still override per pack with -p:Version (e.g. the smoke test's
X.Y.Z.<revision>-prerelease). This replaced the old per-csproj <Version> + UpdateProjectVersion
stamping.
-->
<PropertyGroup>
<!-- One version for the whole solution. Kept in sync with pub/PubVersion.json by the bump. -->
<Version>9.0.860</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Shared language defaults. -->
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup>
<!-- The Apple libraries' targets: iOS, and tvOS beside it only for a build that asks
(-p:VhAppleTv=true, the Apple TV heads'): the Apple TV app is not released yet, and no other
build - CI's packages included - has the tvOS workload. A library's tvOS floor is 17, the
first tvOS with Network Extension. -->
<VhAppleTargetFrameworks>net11.0-ios</VhAppleTargetFrameworks>
<VhAppleTargetFrameworks Condition="'$(VhAppleTv)' == 'true'">net11.0-ios;net11.0-tvos</VhAppleTargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<!-- The Vh checkout root (this repo's parent), defined ONCE for every project: the private
".user" folder and the sibling repos (VpnHood.AppUi.Spa, …) are all found from here,
so no csproj ever counts "..\" again and a clone works wherever it lands. Anchored to
THIS FILE, never to $(SolutionDir) — that property is empty when a project is built on
its own (dotnet build <csproj>, an IDE single-project build), which silently embedded
nothing. An environment variable of the same name still overrides either value. -->
<VhDir Condition="'$(VhDir)' == ''">$(MSBuildThisFileDirectory)..</VhDir>
<VhUserDir Condition="'$(VhUserDir)' == ''">$(VhDir)\.user</VhUserDir>
</PropertyGroup>
<PropertyGroup>
<!-- Shared package metadata (identical across every project; only Description stays per-project). -->
<Company>OmegaHood LLC</Company>
<Copyright>© OmegaHood LLC. All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<PackageLicenseExpression>LGPL-2.1-only</PackageLicenseExpression>
<PackageIcon>VpnHood.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>symbols.nupkg</SymbolPackageFormat>
</PropertyGroup>
<!-- Deterministic source paths in Release builds. -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<!-- SolutionDir is undefined when a project is built directly instead of through the .slnx,
producing the invalid compiler option "=." (CS8101). This props file sits next to
VpnHood.slnx at the repository root, so its own directory is the identical, stable
mapping source for both build styles. -->
<PathMap>$(MSBuildThisFileDirectory)=.</PathMap>
</PropertyGroup>
<!-- Android store version code + display version are derived from $(Version) in
Directory.Build.targets, NOT here: OutputType and the (inner-build) TargetFramework are only
defined AFTER the csproj body, whereas this .props file is imported BEFORE it. A condition on
them here never matches, so ApplicationVersion is never set and the AAB silently ships with the
AndroidManifest default versionCode 1 (which Google Play rejects as "already used"). -->
<!-- Pack the shared package icon (path is relative to this file, so it is depth-independent). -->
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)VpnHood.png" Link="Resources\VpnHood.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>
<!-- The README nuget.org and Visual Studio show: the project's own README.md where it has one, else
the shared README.Packages.md beside this file, packed as README.md. Included here rather than
updated on the SDK's own item, which comes after this file and which a project may turn off
(VpnHood.AppUi.Assets.Classic); hidden, since the SDK already lists a project's own. -->
<ItemGroup>
<None Include="$(MSBuildProjectDirectory)\README.md" Pack="true" PackagePath="" Visible="false"
Condition="Exists('$(MSBuildProjectDirectory)\README.md')" />
<None Include="$(MSBuildThisFileDirectory)README.Packages.md" Pack="true" PackagePath="README.md" Visible="false"
Condition="!Exists('$(MSBuildProjectDirectory)\README.md')" />
</ItemGroup>
<!-- The repo's own analyzers (VH0001: every await says where it continues; VH0002: no .Vhc() in UI
code), run by every project; .editorconfig says where each warns. Only an analyzer: nothing of
it is referenced or packed. -->
<ItemGroup Condition="'$(MSBuildProjectName)' != 'VpnHood.Net.Toolkit.Analyzers'">
<ProjectReference Include="$(MSBuildThisFileDirectory)src\Net\VpnHood.Net.Toolkit.Analyzers\VpnHood.Net.Toolkit.Analyzers.csproj"
OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="all" />
</ItemGroup>
</Project>