forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding support for Single Project
- Loading branch information
Showing
19 changed files
with
307 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
<Project> | ||
<!-- | ||
We aren't currently fully supporting macos because of | ||
https://github.com/xamarin/xamarin-macios/issues/16401 | ||
https://github.com/dotnet/sdk/issues/21877 | ||
--> | ||
<PropertyGroup> | ||
<IsMacOS>true</IsMacOS> | ||
<SupportedOSPlatformVersion Condition=" $(SupportedOSPlatformVersion) == '' ">10.14</SupportedOSPlatformVersion> | ||
|
||
<EnableDefaultMacOSItems>false</EnableDefaultMacOSItems> | ||
<MacOSProjectFolder Condition=" '$(MacOSProjectFolder)' == '' ">$(PlatformsProjectFolder)MacOS\</MacOSProjectFolder> | ||
<MacOSProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(MacOSProjectFolder)'))</MacOSProjectFolder> | ||
<MacOSProjectFolder Condition=" !Exists('$(MacOSProjectFolder)') ">$([MSBuild]::EnsureTrailingSlash('MacOS'))</MacOSProjectFolder> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)Uno.SingleProject.iOSMac.targets" Condition="$(SingleProject) == 'true'" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<!-- App Icon Defaults --> | ||
<UnoIconFolder Condition="$(UnoIconFolder) == ''">$([MSBuild]::EnsureTrailingSlash('$(AssetsFolder)Icons'))</UnoIconFolder> | ||
<UnoSplashFolder Condition="$(UnoSplashFolder) == ''">$([MSBuild]::EnsureTrailingSlash('$(AssetsFolder)Splash'))</UnoSplashFolder> | ||
<UnoIconBackgroundFile Condition="$(UnoIconBackgroundFile) == ''">$(UnoIconFolder)icon.svg</UnoIconBackgroundFile> | ||
<UnoIconForegroundFile Condition="$(UnoIconForegroundFile) == ''">$(UnoIconFolder)icon_foreground.svg</UnoIconForegroundFile> | ||
<UnoIconForegroundScale Condition="$(UnoIconForegroundScale) == ''">0.65</UnoIconForegroundScale> | ||
<UnoIconBackgroundColor Condition="$(UnoIconBackgroundColor) == ''">#00000000</UnoIconBackgroundColor> | ||
<UnoSplashScreenFile Condition="$(UnoSplashScreenFile) == ''">$(UnoSplashFolder)splash_screen.svg</UnoSplashScreenFile> | ||
<UnoSplashScreenBaseSize Condition="$(UnoSplashScreenBaseSize) == ''">128,128</UnoSplashScreenBaseSize> | ||
<UnoSplashScreenColor Condition="$(UnoSplashScreenColor) == ''">#FFFFFF</UnoSplashScreenColor> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="$(SingleProject) == 'true'"> | ||
<UnoIcon Include="$(UnoIconBackgroundFile)" | ||
ForegroundFile="$(UnoIconForegroundFile)" | ||
ForegroundScale="$(UnoIconForegroundScale)" | ||
Color="$(UnoIconBackgroundColor)" | ||
IsDefaultItem="true" | ||
Link="$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))" | ||
Exclude="@(UnoIcom)" | ||
Condition="Exists('$(UnoIconBackgroundFile)') and Exists('$(UnoIconForegroundFile)')" /> | ||
<UnoSplashScreen Include="$(UnoSplashScreenFile)" | ||
BaseSize="$(UnoSplashScreenBaseSize)" | ||
Color="$(UnoSplashScreenColor)" | ||
IsDefaultItem="true" | ||
Link="$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))" | ||
Exclude="@(UnoSplashScreen)" | ||
Condition="Exists('$(UnoSplashScreenFile)')" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<UnoImage Include="Assets\**\*.svg" | ||
Exclude="@(UnoImage);@(UnoIcon);@(UnoSplashScreen);$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" | ||
IsDefaultItem="true" | ||
Link="$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))" /> | ||
</ItemGroup> | ||
</Project> |
11 changes: 11 additions & 0 deletions
11
src/Uno.Sdk/targets/Uno.DefaultItems.SingleProject.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project> | ||
<ItemGroup Condition="Exists('App.xaml') AND !$(TargetFramework.Contains('windows10'))"> | ||
<ApplicationDefinition Include="App.xaml" | ||
SubType="Designer" | ||
XamlRuntime="WinUI" | ||
Generator="MSBuild:Compile" /> | ||
<Compile Include="App.xaml.cs" | ||
XamlRuntime="WinUI" | ||
DependentUpon="App.xaml" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/Uno.Sdk/targets/Uno.ProjectCapabilities.SingleProject.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project> | ||
<!-- Taken from: https://github.com/dotnet/maui/blob/c02a6706534888ccea577d771c9edfc820bfc001/src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.After.targets#L16C3-L26C15 --> | ||
<!-- SingleProject-specific features --> | ||
<ItemGroup> | ||
<ProjectCapability Include="Msix" Exclude="@(ProjectCapability)" /> | ||
<ProjectCapability Include="MauiSingleProject" Exclude="@(ProjectCapability)" /> | ||
<ProjectCapability Include="LaunchProfiles" Exclude="@(ProjectCapability)" /> | ||
<!-- If VS is older than Dev17 --> | ||
<ProjectCapability Include="XamarinStaticLaunchProfiles" Condition=" '$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' < '17.0' " Exclude="@(ProjectCapability)" /> | ||
<!-- Otherwise define LaunchProfilesGroupByPlatformFilters by default --> | ||
<ProjectCapability Include="LaunchProfilesGroupByPlatformFilters" Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' >= '17.0' " Exclude="@(ProjectCapability)" /> | ||
<ProjectCapability Include="SingleTargetBuildForStartupProjects" Condition=" '$(EnableSingleTargetBuildForStartupProjects)' != 'false' " Exclude="@(ProjectCapability)" /> | ||
|
||
<!-- Required since VS 2022 17.4 Preview 1 --> | ||
<ProjectCapability Include="MauiCore" Exclude="@(ProjectCapability)" /> | ||
<ProjectCapability Include="Maui" Exclude="@(ProjectCapability)" /> | ||
<ProjectCapability Include="UseMauiCore" Exclude="@(ProjectCapability)" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition="$(IsWinAppSdk)"> | ||
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<!-- Debugger workaround https://github.com/dotnet/maui-samples/blob/8aa6b8780b12e97b157514c3bdc54bb4a13001cd/HelloMacCatalyst/HelloMacCatalyst.csproj#L7 --> | ||
<!-- <MtouchExtraArgs Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">$(MtouchExtraArgs) -setenv:MONO_THREADS_SUSPEND=preemptive</MtouchExtraArgs> --> | ||
<!-- Required for C# Hot Reload --> | ||
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter> | ||
|
||
<MonoAndroidResourcePrefix>$(AndroidProjectFolder)Resources</MonoAndroidResourcePrefix> | ||
<MonoAndroidAssetsPrefix>$(AndroidProjectFolder)Assets</MonoAndroidAssetsPrefix> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<AndroidEnvironment Include="$(AndroidProjectFolder)environment.conf" | ||
Condition=" Exists($(AndroidProjectFolder)environment.conf) " | ||
Link="$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))" | ||
IsDefaultItem="true" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.