Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
126 lines (113 loc) · 6.38 KB
/
Copy pathDirectory.Build.props
File metadata and controls
126 lines (113 loc) · 6.38 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<Project>
<PropertyGroup>
<!--
The SDK's own default is "Debug;Release" the moment nothing says
otherwise, and an IDE's configuration dropdown offers only what a
project declares here. All plugins (Directory.Build.targets,
Flyback.Editor.Desktop.csproj) needs the name listed to show up in one at all.
-->
<Configurations>Debug;Release;All plugins</Configurations>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AnalysisLevel>latest-recommended</AnalysisLevel>
<!--
The compiler checks every doc comment's crefs and XML. A member need not
be documented (CS1591), nor every parameter once one is (CS1573). The
.xml file stays in obj/, out of the build output and every package.
-->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591;CS1573</NoWarn>
<CopyDocumentationFileToOutputDirectory>false</CopyDocumentationFileToOutputDirectory>
<PublishDocumentationFile>false</PublishDocumentationFile>
<!--
A packages.lock.json beside each project, holding the whole resolved
graph. Directory.Packages.props pins what this repository asks for; the
lock file pins what those packages in turn ask for, which nothing else
names and which can otherwise move under a build that changed nothing.
The gate restores in locked mode, so the lock files are what CI resolves
against and a stale one fails there rather than passing quietly. Changing
a version in Directory.Packages.props therefore means restoring once
locally with the force-evaluate switch and committing the lock files that
restore rewrites. The Dockerfile spells the command out.
-->
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<!--
Whether a release passed the real version with -p:Version=X.Y.Z (see
Dockerfile and the release workflow) before the default below fills the
gap. A command-line property is global and reaches every PropertyGroup
from the start of evaluation, so this reads true exactly when one was
given — it is not testing the assignment below, which runs regardless.
-->
<_VersionSpecified Condition="'$(Version)' != ''">true</_VersionSpecified>
<!--
The version a plain build reports. Every version-bearing assembly
attribute (AssemblyVersion, AssemblyFileVersion,
AssemblyInformationalVersion) is derived from this single property,
which is what About.cs reads back. The suffix is what says it is not a
release where there is no commit to say so: a build from a source
archive has no .git, and a bare version is one ReleaseFeed updates and
Usage counts.
-->
<Version Condition="'$(Version)' == ''">0.1.0-dev</Version>
<!--
A release build's version already names a real release and stands on
its own. A dev build's does not — every plain build is "0.1.0-dev" until
the next release, so the commit it was built from is what actually
tells two of them apart. ShortenSourceRevisionId below trims that
commit to seven characters before GenerateAssemblyInfo appends it.
-->
<IncludeSourceRevisionInInformationalVersion Condition="'$(_VersionSpecified)' != 'true'">true</IncludeSourceRevisionInInformationalVersion>
<IncludeSourceRevisionInInformationalVersion Condition="'$(_VersionSpecified)' == 'true'">false</IncludeSourceRevisionInInformationalVersion>
<!--
The version of what a plugin is compiled against: the public surface of
Flyback.Core and Flyback.Plugins, and nothing else. Those two take it as
their AssemblyVersion in place of the release's, because it is what the
compiler stamps into a plugin and what the host reads back before loading
one, and a release that changed nothing a plugin can see should not look
like one that did.
major something a plugin could have used was removed or changed; every
plugin built against the last one is refused until it is rebuilt
minor something was added; a plugin built against the new one is
refused by a host that only has the old
patch never moves, since a fix that changes no signature changes
nothing a plugin was compiled against
PublicAPI.Shipped.txt beside each of the two projects is that surface as
the last release offered it, and PublicAPI.Unshipped.txt is what has
changed since. Neither project builds until a change to its surface is
written into the second file (the error names the line), so the question
of which number moves is asked in the commit that moves it: the minor
with the first line added since a release, the major with the first line
marked *REMOVED*. Each moves at most once between releases: an
Unshipped.txt that already has lines means the move has been made.
A release moves what is unshipped into what is shipped.
-->
<PluginContractVersion>1.0.0</PluginContractVersion>
<!--
Verify.XunitV3 is MIT, but the Verify package under it ships an Open
Source Maintenance Fee agreement and refuses to build until one of its
exemptions is claimed. Flyback is MIT and earns nothing, which is the
one below. The date is the last month it covers; the build says so again
when it runs out.
-->
<Verify_SponsorshipExemption>OpenSource</Verify_SponsorshipExemption>
<Verify_SponsorshipExemptionUntil>2027-09</Verify_SponsorshipExemptionUntil>
</PropertyGroup>
<!--
$(SourceRevisionId) is the full 40-character commit hash the SDK reads
from .git; AddSourceRevisionToInformationalVersion appends it verbatim.
Hooked between the target that sets it and the one that appends it, so a
dev build's version reads "0.1.0-dev+37fc87f" rather than the full hash.
-->
<Target Name="ShortenSourceRevisionId"
AfterTargets="InitializeSourceControlInformation"
BeforeTargets="AddSourceRevisionToInformationalVersion"
Condition="'$(SourceRevisionId)' != '' and $(SourceRevisionId.Length) >= 7">
<PropertyGroup>
<SourceRevisionId>$(SourceRevisionId.Substring(0, 7))</SourceRevisionId>
</PropertyGroup>
</Target>
</Project>