Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
119 lines (105 loc) · 7.03 KB
/
Copy pathDirectory.Build.props
File metadata and controls
119 lines (105 loc) · 7.03 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
<Project>
<Import Project="$(MSBuildThisFileDirectory)SilVersions.props" />
<!-- Language version, nullable, warnings as errors, deterministic: shared with textediting/ (ADR 0006). -->
<Import Project="$(MSBuildThisFileDirectory)Directory.Build.Common.props" />
<PropertyGroup Condition="'$(MOTIF_PACKAGE_INTERMEDIATE_ROOT)' != ''">
<BaseIntermediateOutputPath>$(MOTIF_PACKAGE_INTERMEDIATE_ROOT)/$(MSBuildProjectName)/</BaseIntermediateOutputPath>
<MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
<DefaultItemExcludes>$(DefaultItemExcludes);obj/**</DefaultItemExcludes>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>0.2.0-beta002</VersionPrefix>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RestorePackagesPath Condition="'$(RestorePackagesPath)' == '' and '$(NUGET_PACKAGES)' == '' and '$(USERPROFILE)' != ''">$(USERPROFILE)/.nuget/packages</RestorePackagesPath>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
<Authors>SIL Global</Authors>
<Company>SIL Global</Company>
<Product>Motif</Product>
<Copyright>Copyright (c) SIL Global</Copyright>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
</PropertyGroup>
<!--
The test assemblies are the tests/SIL.Motif.Tests.* project folders, Support excepted, read from disk
so a new test project needs no edit here. Solution membership is enforced by
CompatibilityTargetTests.EveryTestProjectUnderTestsIsListedInMotifSolution.
-->
<ItemGroup>
<_MotifTestProjectFile Include="$(MSBuildThisFileDirectory)tests\SIL.Motif.Tests.*\SIL.Motif.Tests.*.csproj"
Exclude="$(MSBuildThisFileDirectory)tests\SIL.Motif.Tests.Support\**" />
<MotifTestAssembly Include="@(_MotifTestProjectFile->'%(Filename)')" />
</ItemGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' == 'SIL.Motif.Commands' or '$(MSBuildProjectName)' == 'SIL.Motif.Host' or '$(MSBuildProjectName)' == 'SIL.Motif.LiveHost' or '$(MSBuildProjectName)' == 'SIL.Motif.Runner' or '$(MSBuildProjectName)' == 'SIL.Motif.Worker.Runtime'">
<InternalsVisibleTo Include="@(MotifTestAssembly)" />
</ItemGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' == 'SIL.Motif.App'">
<InternalsVisibleTo Include="SIL.Motif.Tests.App" />
</ItemGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' == 'SIL.Motif.Host' or '$(MSBuildProjectName)' == 'SIL.Motif.Worker.Runtime'">
<InternalsVisibleTo Include="SIL.Motif.Tests.Support" />
</ItemGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' == 'SIL.Motif.Tests.Support'">
<InternalsVisibleTo Include="@(MotifTestAssembly)" />
</ItemGroup>
<!--
One output directory per configuration at the repository root, rather than a bin tree under every
project. The three apphosts then sit side by side, which is the layout a published Motif has:
the CLI finds its worker, and either front end finds a bundled parser, by looking beside itself,
so a development build exercises the same lookup a shipped one does. Windows apphosts have .exe;
Linux and macOS apphosts have no suffix.
Tests and spikes take subdirectories of their own (tests/Directory.Build.props,
spikes/Directory.Build.props). A test host left running holds a lock on whatever directory it was
launched from, and that must not be the product's; and the suite's fake PanGloss executable must
never come to rest beside the real CLI, where parser discovery would prefer it.
-->
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<MotifBinRoot>$(MSBuildThisFileDirectory)bin\$(Configuration)\</MotifBinRoot>
<OutputPath>$(MotifBinRoot)</OutputPath>
<!-- Every project here is single-targeted, so the framework folder only adds depth. -->
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<!--
A build is for one runtime: the one an explicit -r names (packaging, test artifacts), otherwise the build machine's
(win-x64, linux-x64, osx-arm64 or osx-x64). A runtime-agnostic build copies every package's native libraries for
every runtime NuGet knows, about 600 MB per output directory and four output directories per worktree; one runtime
puts that runtime's natives beside the apphosts and nothing else. Other runtimes are built by CI, one job each.
The output path keeps no runtime folder, so the apphosts still sit side by side. Motif supports no 32-bit runtime.
NETCoreSdkRuntimeIdentifier is not yet defined here, and RuntimeInformation.RuntimeIdentifier names a
non-portable runtime under Visual Studio's MSBuild, so the portable name is spelled from OS and architecture.
-->
<PropertyGroup>
<_MotifHostOs Condition="$([MSBuild]::IsOSPlatform('Windows'))">win</_MotifHostOs>
<_MotifHostOs Condition="$([MSBuild]::IsOSPlatform('Linux'))">linux</_MotifHostOs>
<_MotifHostOs Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx</_MotifHostOs>
<_MotifHostArch>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant())</_MotifHostArch>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">$(_MotifHostOs)-$(_MotifHostArch)</RuntimeIdentifier>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<SelfContained Condition="'$(SelfContained)' == ''">false</SelfContained>
</PropertyGroup>
<Target Name="MotifRefuse32BitRuntime" BeforeTargets="Restore;_CheckForInvalidConfigurationAndPlatform"
Condition="$(RuntimeIdentifier.EndsWith('-x86')) or $(RuntimeIdentifier.EndsWith('-arm'))">
<Error Text="Motif supports only 64-bit runtimes; '$(RuntimeIdentifier)' is 32-bit." />
</Target>
<!-- Native package symbols (SkiaSharp's alone are about 100 MB) are for debugging the native library, not Motif. -->
<Target Name="MotifSkipNativePackageSymbols" BeforeTargets="_CopyFilesMarkedCopyLocal">
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)"
Condition="'%(ReferenceCopyLocalPaths.Extension)' == '.pdb' and '%(ReferenceCopyLocalPaths.AssetType)' == 'native'" />
</ItemGroup>
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions"
Version="$(MicrosoftExtensionsDependencyInjectionAbstractionsVersion)" />
</ItemGroup>
<!--
Opt-in local libpalaso override (design rule 16). Off unless LOCAL_NUGET_REPO names an existing
folder; CI never sets it, so this is inert there regardless of what SilVersions.props contains.
tools/Manage-LocalLibraries.ps1 and AGENTS.md document the workflow.
-->
<PropertyGroup>
<MotifLocalPalasoActive Condition="'$(LOCAL_NUGET_REPO)' != '' and Exists('$(LOCAL_NUGET_REPO)')">true</MotifLocalPalasoActive>
<RestoreAdditionalProjectSources Condition="'$(MotifLocalPalasoActive)' == 'true'">$(RestoreAdditionalProjectSources);$(LOCAL_NUGET_REPO)</RestoreAdditionalProjectSources>
</PropertyGroup>
</Project>