Skip to content

Commit

Permalink
Merge pull request #1847 from unoplatform/mergify/bp/release/stable/2…
Browse files Browse the repository at this point in the history
….5/pr-1845

fix: Adding PRI workaround (backport #1845)
  • Loading branch information
jeromelaban committed Sep 1, 2023
2 parents d248a99 + be2898b commit 24e037c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Uno.Extensions.Maui.UI/build/Package.targets
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,23 @@
</Task>
</UsingTask>


<!-- Workaround to avoid including Uno.Toolkit.UI XBFs in the PRI file -->
<Target Name="AdjustGetPackagingOutput1" AfterTargets="GetMrtPackagingOutputs">
<Message Importance="high" Text="Applying NuGet packaging workaround for dependent PRI files exclusion" />
<ItemGroup>
<_OtherPriFiles Include="@(PackagingOutputs)" Condition="'%(Extension)' == '.pri' and ('%(PackagingOutputs.ReferenceSourceTarget)' == 'ProjectReference' or '%(PackagingOutputs.NugetSourceType)'=='Package')" />
<PackagingOutputs Remove="@(_OtherPriFiles)" />
</ItemGroup>
</Target>
<Target Name="AdjustGetPackagingOutput2" BeforeTargets="AddPriPayloadFilesToCopyToOutputDirectoryItems">
<Message Importance="high" Text="Applying NuGet packaging workaround for dependent PRI files exclusion" />
<ItemGroup>
<_OtherPriFiles1 Include="@(_ReferenceRelatedPaths)" Condition="'%(Extension)' == '.pri' and ('%(_ReferenceRelatedPaths.ReferenceSourceTarget)' == 'ProjectReference' or '%(_ReferenceRelatedPaths.NugetSourceType)'=='Package')" />
<_ReferenceRelatedPaths Remove="@(_OtherPriFiles1)" />
<_OtherPriFiles2 Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' == '.pri' and ('%(ReferenceCopyLocalPaths.ReferenceSourceTarget)' == 'ProjectReference' or '%(ReferenceCopyLocalPaths.NugetSourceType)'=='Package')" />
<ReferenceCopyLocalPaths Remove="@(_OtherPriFiles2)" />
</ItemGroup>
</Target>

</Project>

0 comments on commit 24e037c

Please sign in to comment.