Skip to content

Commit

Permalink
Merge pull request #7 from fabulous-dev/packaging
Browse files Browse the repository at this point in the history
Configure dotnet pack to produce only 1 nupkg
  • Loading branch information
TimLariviere authored Feb 1, 2023
2 parents 500967b + 56ae4ea commit 8ecfad6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- Shared NuGet Package info -->
<PropertyGroup Condition="$(IsPackable) == 'true'">
<Authors>Fabulous contributors</Authors>
<PackageTags>Fabulous;F#;Declarative UI;MVU;Maui;Android;iOS;macOS;Windows;Linux</PackageTags>
<PackageTags>Fabulous;F#;Declarative-UI;MVU;Maui;Android;iOS;macOS;Windows;Linux</PackageTags>
<PackageIcon>nuget-icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="NUnit" Version="3.13.3" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageVersion Include="Teronis.MSBuild.Packaging.ProjectBuildInPackage" Version="1.0.0" />
</ItemGroup>

</Project>
9 changes: 6 additions & 3 deletions src/Fabulous.Maui/Fabulous.Maui.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net7.0;net7.0-android;net7.0-ios</TargetFrameworks>
<UseMaui>true</UseMaui>
<UseMauiEssentials>true</UseMauiEssentials>
<IsPackable>true</IsPackable>
</PropertyGroup>
<!-- NuGet Package -->
Expand Down Expand Up @@ -184,13 +185,15 @@
<Compile Include="AppHostBuilderExtensions.fs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Fabulous.Maui.Controls\Fabulous.Maui.Controls.csproj" />
<ProjectReference Include="..\Fabulous.Maui.Controls\Fabulous.Maui.Controls.csproj" PrivateAssets="all" />
<ProjectReference Include="..\Microsoft.Maui.FabCompat\Microsoft.Maui.FabCompat.csproj" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<!--
FSharp.Core is fixed to a specific version that is not necessarily the latest one.
This version will be used as the lower bound in the NuGet package
-->
<PackageReference Include="Teronis.MSBuild.Packaging.ProjectBuildInPackage" PrivateAssets="All" />
<PackageReference Include="FSharp.Core" VersionOverride="7.0.0" PrivateAssets="All" />
<PackageReference Include="Fabulous" VersionOverride="[2.2.0, 2.3.0)" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
Expand Down
7 changes: 1 addition & 6 deletions src/Microsoft.Maui.FabCompat/Microsoft.Maui.FabCompat.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net7.0-ios;net7.0-android</TargetFrameworks>
<TargetFrameworks>net7.0;net7.0-android;net7.0-ios</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseMauiCore>true</UseMauiCore>
<UseMauiEssentials>true</UseMauiEssentials>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework) != 'net7.0-ios'">
<Compile Remove="**\*.iOS.cs" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework) != 'net7.0-android'">
<Compile Remove="**\*.Android.cs" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework) == 'net7.0-ios' or $(TargetFramework) == 'net7.0-android'">
<Compile Remove="**\*.Standard.cs" />
</ItemGroup>

</Project>

0 comments on commit 8ecfad6

Please sign in to comment.