Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix-387
Browse files Browse the repository at this point in the history
* upstream/main: (270 commits)
  Automated dotnet-format update (dotnet#1533)
  Add tests for default colors (dotnet#1532)
  Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485)
  Avoid show the virtual keyboard in the Android TimePicker (dotnet#1428)
  Implement VerticalTextAlignment in WinUI Label (dotnet#1479)
  Changes in the Gallery: include custom fonts, reorganize some pages, etc. (dotnet#1526)
  Don't pack and force a signing failure (dotnet#1527)
  [main] Update dependencies from xamarin/xamarin-android (dotnet#1443)
  Implements EntryHandler IsPassword in WinUI (dotnet#802)
  Automated dotnet-format update (dotnet#1523)
  [Build] Fix net6 Microsoft.Maui.Handlers.Benchmarks assembly (dotnet#1525)
  Update WinUI to 0.8 stable (dotnet#1522)
  Implement the basic WindowHandler (dotnet#1468)
  Automated dotnet-format update (dotnet#1510)
  Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328)
  Avoid create a drawable to set the Background if is not necessary (dotnet#1504)
  Android Gestures (dotnet#1489)
  Revert to using Navigation Page Shims (dotnet#1495)
  Allow to navigate to the same item after navigate back (dotnet#1503)
  Automated dotnet-format update (dotnet#1499)
  ...
  • Loading branch information
Csaba8472 committed Jul 4, 2021
2 parents 102a9fc + 814ee94 commit f6134c9
Show file tree
Hide file tree
Showing 1,516 changed files with 38,292 additions and 10,685 deletions.
1 change: 1 addition & 0 deletions .nuspec/Microsoft.Maui.Controls.Debug.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MauiKeepXamlResources>True</MauiKeepXamlResources>
<_MauiForceXamlCForDebug>True</_MauiForceXamlCForDebug>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.targets" />
Expand Down
8 changes: 6 additions & 2 deletions .nuspec/Microsoft.Maui.Controls.DefaultItems.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<!--
NOTE: this file is only used by projects in the dotnet/maui repo directly.
AutoImport.props should be used by the .NET 6 workload when $(UseMaui) is true.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<ItemGroup Condition="'$(EnableDefaultItems)'=='True' And '$(EnableDefaultXamlItems)'=='True' And '$(EnableDefaultEmbeddedResourceItems)'=='True'">
<EmbeddedResource Include="**\*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" SubType="Designer" Generator="MSBuild:UpdateDesignTimeXaml" />
<MauiXaml Include="**\*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)"/>
</ItemGroup>

<ItemGroup Condition="'$(EnableDefaultItems)'=='True' And '$(EnableDefaultCssItems)'=='True' And '$(EnableDefaultEmbeddedResourceItems)'=='True'">
<EmbeddedResource Include="**\*.css" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<MauiCss Include="**\*.css" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" />
</ItemGroup>

<Import Project="Microsoft.Maui.Controls.SingleProject.props" />
Expand Down
1 change: 1 addition & 0 deletions .nuspec/Microsoft.Maui.Controls.DefaultItems.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<Compile Update="**\*.xaml$(DefaultLanguageSourceExtension)" DependentUpon="%(Filename)" SubType="Code" />
<None Remove="**\*.xaml" Condition="'$(EnableDefaultNoneItems)'=='True'" />
</ItemGroup>

<ItemGroup Condition="'$(EnableDefaultItems)'=='True' And '$(EnableDefaultCssItems)'=='True' And '$(EnableDefaultEmbeddedResourceItems)'=='True'">
<None Remove="**\*.css" Condition="'$(EnableDefaultNoneItems)'=='True'" />
</ItemGroup>
Expand Down
19 changes: 14 additions & 5 deletions .nuspec/Microsoft.Maui.Controls.MultiTargeting.targets
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,23 @@
<None Include="**\Windows\**\*.cs" />
<Compile Remove="**\*.uwp.cs" />
<None Include="**\*.uwp.cs" />
<MauiXaml Remove="**\*.Windows.xaml" />
<None Include="**\*.Windows.xaml" />
<Compile Remove="**\*.Windows.xaml.cs" />
<None Include="**\*.Windows.xaml.cs" />
<MauiXaml Remove="**\Windows\**\*.xaml" />
<None Include="**\Windows\**\*.xaml" />
<Compile Remove="**\Windows\**\*.xaml.cs" />
<None Include="**\Windows\**\*.xaml.cs" />
</ItemGroup>
<ItemGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">
<Compile Remove="**\*.uwp.cs" />
<None Include="**\*.uwp.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="bin\**;obj\**" />
<None Remove="bin\**;obj\**" />
</ItemGroup>

<PropertyGroup>
<!-- Windows -->
Expand Down Expand Up @@ -95,11 +107,8 @@
<PackageReference Include="Microsoft.ProjectReunion" />
<PackageReference Include="Microsoft.ProjectReunion.Foundation" />
<PackageReference Include="Microsoft.ProjectReunion.WinUI" />
<PackageReference Include="Microsoft.ProjectReunion.InteractiveExperiences" NoWarn="NU1701" />
<PackageReference Include="Microsoft.Graphics.Win2D" />
<PackageReference Include="Microsoft.Maui.Graphics.Win2D.WinUI.Desktop" />
</ItemGroup>
<Target Name="Net6WinUIWorkaround" BeforeTargets="_GetSdkToolsPathsFromSdk" Condition="$(TargetFramework.Contains('-windows')) == true ">
<PropertyGroup>
<TargetPlatformIdentifierAdjusted>UAP</TargetPlatformIdentifierAdjusted>
</PropertyGroup>
</Target>
</Project>
61 changes: 58 additions & 3 deletions .nuspec/Microsoft.Maui.Controls.SingleProject.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
NOTE: this file is only used by projects in the dotnet/maui repo directly.
AutoImport.props should be used by the .NET 6 workload when $(UseMaui) is true.
-->

<!-- "Single Project" support - all <ItemGroup/>'s must check if $(EnableDefaultItems) and $(SingleProject) are true -->
<Project>

Expand All @@ -17,7 +22,18 @@

<!-- iOS -->
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and '$(iOSProjectFolder)' != '' ">
<None Include="$(iOSProjectFolder)Info.plist" LogicalName="Info.plist" />
<None
Include="$(iOSProjectFolder)Info.plist"
Condition="Exists('$(iOSProjectFolder)Info.plist')"
Exclude="$(_SingleProjectiOSExcludes)"
LogicalName="Info.plist"
IsDefaultItem="true"
/>
<BundleResource
Include="$(iOSProjectFolder)Resources\**"
Exclude="$(_SingleProjectiOSExcludes)"
IsDefaultItem="true"
/>
<ImageAsset
Include="$(iOSProjectFolder)**/*.xcassets/**/*.png;$(iOSProjectFolder)**/*.xcassets/*/*.jpg;$(iOSProjectFolder)**/*.xcassets/**/*.pdf;$(iOSProjectFolder)**/*.xcassets/**/*.json"
Exclude="$(_SingleProjectiOSExcludes)"
Expand All @@ -41,7 +57,18 @@

<!-- MacCatalyst -->
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and '$(MacCatalystProjectFolder)' != '' ">
<None Include="$(MacCatalystProjectFolder)Info.plist" LogicalName="Info.plist" />
<None
Include="$(MacCatalystProjectFolder)Info.plist"
Condition="Exists('$(MacCatalystProjectFolder)Info.plist')"
Exclude="$(_SingleProjectMacCatalystExcludes)"
LogicalName="Info.plist"
IsDefaultItem="true"
/>
<BundleResource
Include="$(MacCatalystProjectFolder)Resources\**"
Exclude="$(_SingleProjectMacCatalystExcludes)"
IsDefaultItem="true"
/>
<ImageAsset
Include="$(MacCatalystProjectFolder)**/*.xcassets/**/*.png;$(MacCatalystProjectFolder)**/*.xcassets/*/*.jpg;$(MacCatalystProjectFolder)**/*.xcassets/**/*.pdf;$(MacCatalystProjectFolder)**/*.xcassets/**/*.json"
Exclude="$(_SingleProjectMacCatalystExcludes)"
Expand All @@ -63,4 +90,32 @@
/>
</ItemGroup>

</Project>
<!-- Windows -->
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'windows' and '$(WindowsProjectFolder)' != '' ">
<Manifest
Include="$(ApplicationManifest)"
Condition="Exists('$(ApplicationManifest)')" />
<AppxManifest
Include="$(PackageManifest)"
Condition="Exists('$(PackageManifest)')" />
<ApplicationDefinition
Condition="Exists('$(WindowsProjectFolder)App.xaml')"
Include="$(WindowsProjectFolder)App.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</ApplicationDefinition>
<ApplicationDefinition
Condition="Exists('$(WindowsProjectFolder)\Application.xaml')"
Include="$(WindowsProjectFolder)Application.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</ApplicationDefinition>
<Page
Include="$(WindowsProjectFolder)**/*.xaml"
Exclude="$(_SingleProjectWindowsExcludes);@(ApplicationDefinition)">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</Page>
</ItemGroup>

</Project>
85 changes: 62 additions & 23 deletions .nuspec/Microsoft.Maui.Controls.SingleProject.targets
Original file line number Diff line number Diff line change
@@ -1,44 +1,83 @@
<!-- "Single Project" support -->
<Project>

<PropertyGroup Condition=" '$(SingleProject)' == 'true' ">
<PlatformsProjectFolder Condition=" '$(PlatformsProjectFolder)' == '' ">Platforms\</PlatformsProjectFolder>
<!-- Android -->
<EnableDefaultAndroidItems>false</EnableDefaultAndroidItems>
<AndroidProjectFolder Condition=" '$(AndroidProjectFolder)' == '' ">Android\</AndroidProjectFolder>
<AndroidManifest>$(AndroidProjectFolder)AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>$(AndroidProjectFolder)Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>$(AndroidProjectFolder)Assets</MonoAndroidAssetsPrefix>
<AndroidProjectFolder Condition=" '$(AndroidProjectFolder)' == '' ">$(PlatformsProjectFolder)Android\</AndroidProjectFolder>
<!-- iOS -->
<EnableDefaultiOSItems>false</EnableDefaultiOSItems>
<iOSProjectFolder Condition=" '$(iOSProjectFolder)' == '' ">iOS\</iOSProjectFolder>
<IPhoneResourcePrefix Condition=" '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'ios' ">$(iOSProjectFolder)Resources</IPhoneResourcePrefix>
<_SingleProjectiOSExcludes>$(iOSProjectFolder)/**/.*/**</_SingleProjectiOSExcludes>

<iOSProjectFolder Condition=" '$(iOSProjectFolder)' == '' ">$(PlatformsProjectFolder)\iOS\</iOSProjectFolder>
<!-- MacCatalyst -->
<EnableDefaultMacCatalystItems>false</EnableDefaultMacCatalystItems>
<MacCatalystProjectFolder Condition=" '$(MacCatalystProjectFolder)' == '' ">MacCatalyst\</MacCatalystProjectFolder>
<IPhoneResourcePrefix Condition=" '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'maccatalyst' ">$(MacCatalystProjectFolder)Resources</IPhoneResourcePrefix>
<MacCatalystProjectFolder Condition=" '$(MacCatalystProjectFolder)' == '' ">$(PlatformsProjectFolder)\MacCatalyst\</MacCatalystProjectFolder>
<!-- Windows -->
<EnableDefaultWindowsItems>false</EnableDefaultWindowsItems>
<WindowsProjectFolder Condition=" '$(WindowsProjectFolder)' == '' ">$(PlatformsProjectFolder)\Windows\</WindowsProjectFolder>
</PropertyGroup>

<PropertyGroup Condition=" '$(SingleProject)' == 'true' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'android' ">
<AndroidManifest Condition=" Exists('$(AndroidProjectFolder)AndroidManifest.xml') ">$(AndroidProjectFolder)AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>$(AndroidProjectFolder)Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>$(AndroidProjectFolder)Assets</MonoAndroidAssetsPrefix>
</PropertyGroup>

<PropertyGroup Condition=" '$(SingleProject)' == 'true' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'ios' ">
<IPhoneResourcePrefix>$(iOSProjectFolder)Resources</IPhoneResourcePrefix>
<CodesignEntitlements Condition=" Exists('$(iOSProjectFolder)Entitlements.plist') ">$(iOSProjectFolder)Entitlements.plist</CodesignEntitlements>
<_SingleProjectiOSExcludes>$(iOSProjectFolder)/**/.*/**</_SingleProjectiOSExcludes>
</PropertyGroup>

<PropertyGroup Condition=" '$(SingleProject)' == 'true' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'maccatalyst' ">
<IPhoneResourcePrefix>$(MacCatalystProjectFolder)Resources</IPhoneResourcePrefix>
<CodesignEntitlements Condition=" Exists('$(MacCatalystProjectFolder)Entitlements.plist') ">$(MacCatalystProjectFolder)Entitlements.plist</CodesignEntitlements>
<_SingleProjectMacCatalystExcludes>$(MacCatalystProjectFolder)/**/.*/**</_SingleProjectMacCatalystExcludes>
</PropertyGroup>

<PropertyGroup Condition=" '$(SingleProject)' == 'true' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'windows' ">
<ApplicationManifest Condition=" Exists('$(WindowsProjectFolder)app.manifest') ">$(WindowsProjectFolder)app.manifest</ApplicationManifest>
<PackageManifest Condition=" Exists('$(WindowsProjectFolder)Package.appxmanifest') ">$(WindowsProjectFolder)Package.appxmanifest</PackageManifest>
<RuntimeIdentifiers Condition=" '$(RuntimeIdentifiers)' == '' ">win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<EnableDefaultPageItems>False</EnableDefaultPageItems>
<EnableDefaultApplicationDefinition>False</EnableDefaultApplicationDefinition>
<_SingleProjectWindowsExcludes>$(WindowsProjectFolder)/**/.*/**</_SingleProjectWindowsExcludes>
</PropertyGroup>

<!-- Removals -->
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' and '$(SingleProject)' == 'true' ">
<Compile
Condition=" '$(TargetPlatformIdentifier)' != 'android' and '$(AndroidProjectFolder)' != '' "
Remove="$(AndroidProjectFolder)**/*$(DefaultLanguageSourceExtension)"
/>
<Compile
Condition=" '$(TargetPlatformIdentifier)' != 'ios' and '$(iOSProjectFolder)' != '' "
Remove="$(iOSProjectFolder)**/*$(DefaultLanguageSourceExtension)"
/>
<Compile
Condition=" '$(TargetPlatformIdentifier)' != 'maccatalyst' and '$(MacCatalystProjectFolder)' != '' "
Remove="$(MacCatalystProjectFolder)**/*$(DefaultLanguageSourceExtension)"
/>
<!-- Explicitly include the platform code -->
<_MauiCompileToAdd
Condition=" '$(TargetPlatformIdentifier)' == 'android' and '$(AndroidProjectFolder)' != '' "
Include="$(AndroidProjectFolder)**/*$(DefaultLanguageSourceExtension)" />
<_MauiCompileToAdd
Condition=" '$(TargetPlatformIdentifier)' == 'ios' and '$(iOSProjectFolder)' != '' "
Include="$(iOSProjectFolder)**/*$(DefaultLanguageSourceExtension)" />
<_MauiCompileToAdd
Condition=" '$(TargetPlatformIdentifier)' == 'maccatalyst' and '$(MacCatalystProjectFolder)' != '' "
Include="$(MacCatalystProjectFolder)**/*$(DefaultLanguageSourceExtension)" />
<_MauiCompileToAdd
Condition=" '$(TargetPlatformIdentifier)' == 'windows' and '$(WindowsProjectFolder)' != '' "
Include="$(WindowsProjectFolder)**/*$(DefaultLanguageSourceExtension)" />
<None Include="$(PlatformsProjectFolder)**/*$(DefaultLanguageSourceExtension)" Exclude="@(_MauiCompileToAdd)" />
<Compile Remove="$(PlatformsProjectFolder)**/*$(DefaultLanguageSourceExtension)" />
<Compile Include="@(_MauiCompileToAdd)" />
<_MauiCompileToAdd Remove="@(_MauiCompileToAdd)" />

<!-- Remove all Windows (WinUI) XAML Files from the Windows folder -->
<_MauiXamlToRemove
Condition="'$(WindowsProjectFolder)' != ''"
Include="$(WindowsProjectFolder)**/*.xaml" />
<EmbeddedResource Remove="@(_MauiXamlToRemove)" />
<MauiXaml Remove="@(_MauiXamlToRemove)" />
<None Include="@(_MauiXamlToRemove)" />
<_MauiXamlToRemove Remove="@(_MauiXamlToRemove)" />
</ItemGroup>

<!-- IDE capabilities -->
<ItemGroup Condition=" '$(SingleProject)' == 'true' ">
<ProjectCapability Include="MauiSingleProject" />
<ProjectCapability Include="LaunchProfiles" />
</ItemGroup>
</Project>

</Project>
11 changes: 9 additions & 2 deletions .nuspec/Microsoft.Maui.Controls.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!--
Expand All @@ -10,10 +9,18 @@
The actual item groups are in a separate conditionally-imported file as they use constructs that
are not compatible with older MSBuild versions.
-->
<Import Project="$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.DefaultItems.props" Condition="'$(MSBuildSDKsPath)'!=''" />
<Import Project="$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.DefaultItems.props" Condition="'$(UsingMicrosoftMauiControlsSdk)' != 'true' and '$(MSBuildSDKsPath)' != ''" />

<PropertyGroup>
<_IsHotRestartDefined>$([System.Text.RegularExpressions.Regex]::IsMatch('$(DefineConstants.Trim())', '(^|;)HOTRESTART($|;)'))</_IsHotRestartDefined>
<DefineConstants Condition="!$(_IsHotRestartDefined) And '$(IsHotRestartBuild)' == 'true'">HOTRESTART;$(DefineConstants)</DefineConstants>
</PropertyGroup>

<ItemGroup>
<CompilerVisibleItemMetadata Include="AdditionalFiles" MetadataName="GenKind" />
<CompilerVisibleItemMetadata Include="AdditionalFiles" MetadataName="ManifestResourceName" />
<CompilerVisibleItemMetadata Include="AdditionalFiles" MetadataName="TargetPath" />
<CompilerVisibleItemMetadata Include="AdditionalFiles" MetadataName="ItemSpec" />
</ItemGroup>

</Project>
Loading

0 comments on commit f6134c9

Please sign in to comment.