forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
145 lines (130 loc) · 11.4 KB
/
Directory.Build.props
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<Project>
<Import Project="eng\Versions.props" />
<PropertyGroup>
<_MauiDotNetVersionMajor Condition="'$(_MauiDotNetVersionMajor)' == ''">6</_MauiDotNetVersionMajor>
<_MauiDotNetVersionMinor Condition="'$(_MauiDotNetVersionMinor)' == ''">0</_MauiDotNetVersionMinor>
<_MauiDotNetVersion Condition="'$(_MauiDotNetVersion)' == ''">$(_MauiDotNetVersionMajor).$(_MauiDotNetVersionMinor)</_MauiDotNetVersion>
<_MauiDotNetTfm Condition="'$(_MauiDotNetTfm)' == ''">net$(_MauiDotNetVersion)</_MauiDotNetTfm>
<_MauiTargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</_MauiTargetPlatformIdentifier>
<_MauiNoTargetPlatform Condition="'$(_MauiTargetPlatformIdentifier)' == ''">True</_MauiNoTargetPlatform>
<_MauiTargetPlatformIsAndroid Condition="'$(_MauiTargetPlatformIdentifier)' == 'android'">True</_MauiTargetPlatformIsAndroid>
<_MauiTargetPlatformIsiOS Condition="'$(_MauiTargetPlatformIdentifier)' == 'ios'">True</_MauiTargetPlatformIsiOS>
<_MauiTargetPlatformIsMacCatalyst Condition="'$(_MauiTargetPlatformIdentifier)' == 'maccatalyst'">True</_MauiTargetPlatformIsMacCatalyst>
<_MauiTargetPlatformIsmacOS Condition="'$(_MauiTargetPlatformIdentifier)' == 'macos'">True</_MauiTargetPlatformIsmacOS>
<_MauiTargetPlatformIstvOS Condition="'$(_MauiTargetPlatformIdentifier)' == 'tvos'">True</_MauiTargetPlatformIstvOS>
<_MauiTargetPlatformIsWindows Condition="$(_MauiTargetPlatformIdentifier.Contains('windows')) == 'True'">True</_MauiTargetPlatformIsWindows>
<_MauiTargetPlatformIsTizen Condition="'$(_MauiTargetPlatformIdentifier)' == 'tizen'">True</_MauiTargetPlatformIsTizen>
</PropertyGroup>
<!-- Try determine which .NET workloads are installed -->
<PropertyGroup Condition="'$(CI)' != 'true' and '$(TF_BUILD)' != 'true'">
<DotNetWorkloadVersionRegex>\d+\.\d+\.\d+(-[a-z]+[\.\d+]+)?</DotNetWorkloadVersionRegex>
<DotNetWorkloadInstallLocation Condition="'$(DotNetWorkloadInstallLocation)' == '' and Exists('$(DOTNET_ROOT)\sdk-manifests\$(DotNetVersionBand)\microsoft.net.sdk.macos\WorkloadManifest.json')">$(DOTNET_ROOT)\sdk-manifests\$(DotNetVersionBand)\</DotNetWorkloadInstallLocation>
<DotNetWorkloadInstallLocation Condition="'$(DotNetWorkloadInstallLocation)' == '' and Exists('$(ProgramFiles)\dotnet\sdk-manifests\$(DotNetVersionBand)\microsoft.net.sdk.macos\WorkloadManifest.json')">$(ProgramFiles)\dotnet\sdk-manifests\$(DotNetVersionBand)\</DotNetWorkloadInstallLocation>
<DotNetWorkloadPacksInstallLocation Condition="'$(DotNetWorkloadInstallLocation)' != ''">$(DotNetWorkloadInstallLocation)..\..\packs\</DotNetWorkloadPacksInstallLocation>
<DotNetMacOSWorkloadInstalledVersion Condition="Exists('$(DotNetWorkloadInstallLocation)microsoft.net.sdk.macos\WorkloadManifest.json')">$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(DotNetWorkloadInstallLocation)\microsoft.net.sdk.macos\WorkloadManifest.json')), '$(DotNetWorkloadVersionRegex)'))</DotNetMacOSWorkloadInstalledVersion>
<DotNetTizenWorkloadInstalledVersion Condition="Exists('$(DotNetWorkloadInstallLocation)samsung.net.sdk.tizen\WorkloadManifest.json')">$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(DotNetWorkloadInstallLocation)\samsung.net.sdk.tizen\WorkloadManifest.json')), $(DotNetWorkloadVersionRegex)))</DotNetTizenWorkloadInstalledVersion>
<DotNetMacOSWorkloadIsInstalled Condition="Exists('$(DotNetWorkloadPacksInstallLocation)Microsoft.macOS.Sdk\$(DotNetMacOSWorkloadInstalledVersion)\Sdk\AutoImport.props')">true</DotNetMacOSWorkloadIsInstalled>
<DotNetTizenWorkloadIsInstalled Condition="Exists('$(DotNetWorkloadPacksInstallLocation)Samsung.Tizen.Sdk\$(DotNetTizenWorkloadInstalledVersion)\Sdk\AutoImport.props')">true</DotNetTizenWorkloadIsInstalled>
<IncludeWindowsTargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) or '$(Packing)' == 'true'">true</IncludeWindowsTargetFrameworks>
<IncludeMacOSTargetFrameworks Condition="'$(DotNetMacOSWorkloadIsInstalled)' == 'true'">true</IncludeMacOSTargetFrameworks>
<IncludeTizenTargetFrameworks Condition="'$(DotNetTizenWorkloadIsInstalled)' == 'true'">true</IncludeTizenTargetFrameworks>
<IncludeAndroidTargetFrameworks>true</IncludeAndroidTargetFrameworks>
<IncludeMacCatalystTargetFrameworks>true</IncludeMacCatalystTargetFrameworks>
<IncludeIosTargetFrameworks>true</IncludeIosTargetFrameworks>
</PropertyGroup>
<!-- this is CI, so everything should be there -->
<PropertyGroup Condition="'$(CI)' == 'true' or '$(TF_BUILD)' == 'true'">
<IncludeWindowsTargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">true</IncludeWindowsTargetFrameworks>
<IncludeTizenTargetFrameworks>true</IncludeTizenTargetFrameworks>
<IncludeMacOSTargetFrameworks>true</IncludeMacOSTargetFrameworks>
<IncludeAndroidTargetFrameworks>true</IncludeAndroidTargetFrameworks>
<IncludeMacCatalystTargetFrameworks>true</IncludeMacCatalystTargetFrameworks>
<IncludeIosTargetFrameworks>true</IncludeIosTargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="'$(_MauiTargetPlatformIsWindows)' == 'True'">$(DefineConstants);WINDOWS</DefineConstants>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- <GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles> -->
<!-- HACK: WinUI seems to have issues without this -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>
<DisableEmbeddedXbf>false</DisableEmbeddedXbf>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
</PropertyGroup>
<!-- version number information -->
<PropertyGroup>
<IosTargetFrameworkVersion>13.6</IosTargetFrameworkVersion>
<TvosTargetFrameworkVersion>13.6</TvosTargetFrameworkVersion>
<MacCatalystTargetFrameworkVersion>13.5</MacCatalystTargetFrameworkVersion>
<MacosTargetFrameworkVersion>10.14</MacosTargetFrameworkVersion>
<AndroidTargetFrameworkVersion>30.0</AndroidTargetFrameworkVersion>
<WindowsTargetFrameworkVersion>10.0.19041</WindowsTargetFrameworkVersion>
<Windows2TargetFrameworkVersion>10.0.20348</Windows2TargetFrameworkVersion>
<TizenTargetFrameworkVersion>6.5</TizenTargetFrameworkVersion>
</PropertyGroup>
<Import Condition="Exists('Directory.Build.Override.props')" Project="Directory.Build.Override.props" />
<PropertyGroup>
<!-- the real TFMs -->
<WindowsMauiPlatforms Condition="'$(WindowsMauiPlatforms)' == ''">net$(_MauiDotNetVersion)-windows$(WindowsTargetFrameworkVersion);net$(_MauiDotNetVersion)-windows$(Windows2TargetFrameworkVersion)</WindowsMauiPlatforms>
<MauiPlatforms Condition="'$(IncludeTizenTargetFrameworks)' == 'true'">net$(_MauiDotNetVersion)-tizen;$(MauiPlatforms)</MauiPlatforms>
<MauiPlatforms Condition="'$(IncludeWindowsTargetFrameworks)' == 'true'">$(WindowsMauiPlatforms);$(MauiPlatforms)</MauiPlatforms>
<MauiPlatforms Condition="'$(IncludeAndroidTargetFrameworks)' == 'true'">net$(_MauiDotNetVersion)-android;$(MauiPlatforms)</MauiPlatforms>
<MauiPlatforms Condition="'$(IncludeMacCatalystTargetFrameworks)' == 'true'">net$(_MauiDotNetVersion)-maccatalyst;$(MauiPlatforms)</MauiPlatforms>
<MauiPlatforms Condition="'$(IncludeIosTargetFrameworks)' == 'true'">net$(_MauiDotNetVersion)-ios;$(MauiPlatforms)</MauiPlatforms>
<!-- Device Tests TFMs (no Tizen yet) -->
<MauiDeviceTestsPlatforms Condition="'$(IncludeWindowsTargetFrameworks)' == 'true'">$(WindowsMauiPlatforms);$(MauiDeviceTestsPlatforms)</MauiDeviceTestsPlatforms>
<MauiDeviceTestsPlatforms Condition="'$(IncludeAndroidTargetFrameworks)' == 'true'">net$(_MauiDotNetVersion)-android;$(MauiDeviceTestsPlatforms)</MauiDeviceTestsPlatforms>
<MauiDeviceTestsPlatforms Condition="'$(IncludeMacCatalystTargetFrameworks)' == 'true'">net$(_MauiDotNetVersion)-maccatalyst;$(MauiDeviceTestsPlatforms)</MauiDeviceTestsPlatforms>
<MauiDeviceTestsPlatforms Condition="'$(IncludeIosTargetFrameworks)' == 'true'">net$(_MauiDotNetVersion)-ios;$(MauiDeviceTestsPlatforms)</MauiDeviceTestsPlatforms>
<!-- Graphics TFMs -->
<MauiGraphicsPlatforms>$(MauiPlatforms)</MauiGraphicsPlatforms>
<MauiGraphicsPlatforms Condition="'$(IncludeMacOSTargetFrameworks)' == 'true'">$(MauiGraphicsPlatforms);net$(_MauiDotNetVersion)-macos</MauiGraphicsPlatforms>
</PropertyGroup>
<PropertyGroup>
<MauiRootDirectory>$(MSBuildThisFileDirectory)</MauiRootDirectory>
<MauiSrcDirectory>$(MSBuildThisFileDirectory)src/</MauiSrcDirectory>
<MauiNuSpecDirectory>$(MSBuildThisFileDirectory).nuspec/</MauiNuSpecDirectory>
<DotNetOutputPath>$(MSBuildThisFileDirectory)bin/</DotNetOutputPath>
<DotNetTempDirectory>$(DotNetOutputPath)temp/</DotNetTempDirectory>
<DotNetDirectory>$(DotNetOutputPath)dotnet/</DotNetDirectory>
<DotNetToolPath>$(DotNetDirectory)dotnet</DotNetToolPath>
<DotNetPacksDirectory>$(DotNetDirectory)packs/</DotNetPacksDirectory>
<DotNetLibraryPacksDirectory>$(DotNetDirectory)library-packs/</DotNetLibraryPacksDirectory>
<DotNetSdkManifestsDirectory>$(DotNetDirectory)sdk-manifests/$(DotNetVersionBand)/</DotNetSdkManifestsDirectory>
<DotNetTemplatePacksDirectory>$(DotNetDirectory)template-packs/</DotNetTemplatePacksDirectory>
<_MauiBuildTasksLocation>$(_MauiBuildTasksLocation)</_MauiBuildTasksLocation>
<_MauiBuildTasksLocation Condition="'$(_MauiBuildTasksLocation)' == ''">$(MSBuildThisFileDirectory).nuspec\</_MauiBuildTasksLocation>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>portable</DebugType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Company>Microsoft</Company>
<Product>Microsoft MAUI</Product>
<ProduceReferenceAssembly Condition="'$(UsingMicrosoftNETSdk)' == 'True' AND '$(Configuration)' == 'Debug'">True</ProduceReferenceAssembly>
<ProduceReferenceAssemblyInOutDir>True</ProduceReferenceAssemblyInOutDir>
<Win2DWarnNoPlatform>false</Win2DWarnNoPlatform>
</PropertyGroup>
<PropertyGroup>
<GitDefaultBranch>main</GitDefaultBranch>
</PropertyGroup>
<PropertyGroup>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>Microsoft</Authors>
<NeutralLanguage>en</NeutralLanguage>
<RepositoryUrl>https://github.com/dotnet/maui.git</RepositoryUrl>
<PackageProjectUrl>https://github.com/dotnet/maui</PackageProjectUrl>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageVersion>$(DotNetVersionBand)-dev</PackageVersion>
<PackageOutputPath>$(MSBuildThisFileDirectory)artifacts</PackageOutputPath>
</PropertyGroup>
<!-- This target is replaced by GitInfo when restored. Allows Versions.targets to rely on it before restore. -->
<Target Name="GitVersion" />
<Target Name="GitInfo" />
<Import Condition="'$(EnvironmentBuildPropsImported)' != 'True'" Project="$(MSBuildThisFileDirectory)eng\Environment.Build.props" />
<Import Condition="'$(SampleProject)' != 'True' and '$(CI)' == 'true'" Project="$(MSBuildThisFileDirectory)eng\SourceLink.Build.props" />
<ItemGroup Condition="'$(MSBuildVersion)' != '' AND '$(MSBuildVersion)' < '16.7.0' ">
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.2.0" PrivateAssets="all" />
</ItemGroup>
</Project>