Skip to content

Commit a52fbcb

Browse files
[Xamarin.Android.Build.Tasks] remove @(_AndroidAssemblySkipCases) (#8622)
In an effort to remove old, unused code, we should be able to remove the following related to the old `Android.Support.*` libraries: * `Xamarin.Android.SkipCases.projitems` and the `@(_AndroidAssemblySkipCases)` item group. This was a build performance optimization added in 02c07ed that would *skip* a build step that normalized casing for `.dll` files with an embedded `__AndroidLibraryProjects__.zip`. This optimization is not needed at all for `.aar` files. In .NET 9 projects, we don't create or embed `__AndroidLibraryProjects__.zip`, so modern projects don't need this optimization. Instead we bundle a `MyLibrary.aar` alongside `MyLibrary.dll` inside of a `MyLibrary` NuGet package. * Automatic trimming of the `Xamarin.Android.Support.*` assemblies Modern packages mark themselves trimmable with `$(IsTrimmable)` or the assembly-level attribute. Let's just remove the case for `Android.Support` here.
1 parent af7c12c commit a52fbcb

File tree

5 files changed

+1
-197
lines changed

5 files changed

+1
-197
lines changed

build-tools/installers/create-installers.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@
157157
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.DesignTime.targets" />
158158
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.EmbeddedResource.targets" />
159159
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Javac.targets" />
160-
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.SkipCases.projitems" />
161160
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Tooling.targets" />
162161
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Tools.Aidl.dll" />
163162
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Tools.Aidl.pdb" />

src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.ILLink.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This file contains the .NET 5-specific targets to customize ILLink
3131
Trim="true" />
3232
<!-- TODO: remove setting the trim mode here, once the support packages are updated to NET6 and compatability packages not needed -->
3333
<ResolvedFileToPublish
34-
Condition=" '$(AndroidLinkMode)' == 'SdkOnly' and ( $([System.String]::Copy(%(Filename)).StartsWith ('Xamarin.AndroidX.')) or $([System.String]::Copy(%(Filename)).StartsWith ('Xamarin.Android.Support.')) or $([System.String]::Copy(%(Filename)).StartsWith ('Xamarin.Google.')) or $([System.String]::Copy(%(Filename)).StartsWith ('Xamarin.GooglePlayServices.')) ) ">
34+
Condition=" '$(AndroidLinkMode)' == 'SdkOnly' and ( $([System.String]::Copy(%(Filename)).StartsWith ('Xamarin.AndroidX.')) or $([System.String]::Copy(%(Filename)).StartsWith ('Xamarin.Google.')) or $([System.String]::Copy(%(Filename)).StartsWith ('Xamarin.GooglePlayServices.')) ) ">
3535
<TrimMode>link</TrimMode>
3636
</ResolvedFileToPublish>
3737

src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.targets

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@
149149
<None Include="Xamarin.Android.VisualBasic.targets">
150150
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
151151
</None>
152-
<None Include="Xamarin.Android.SkipCases.projitems">
153-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
154-
</None>
155152
</ItemGroup>
156153
<ItemGroup>
157154
<None Include="ManifestOverlays\Timing.xml">

src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
376376
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Android.EmbeddedResource.targets" />
377377
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Android.Javac.targets" />
378378
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Android.Resource.Designer.targets" />
379-
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Android.SkipCases.projitems" />
380379
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Android.Tooling.targets" />
381380

382381
<Target Name="_WriteLockFile" Condition=" '$(_AndroidDetectParallelBuilds)' == 'True' ">
@@ -401,10 +400,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
401400
/>
402401
</Target>
403402

404-
<ItemGroup>
405-
<AndroidCustomMetaDataForReferences Include="@(_AndroidAssemblySkipCases)" />
406-
</ItemGroup>
407-
408403
<Target Name="_AddAndroidCustomMetaData">
409404
<AppendCustomMetadataToItemGroup
410405
Condition="'$(AndroidApplication)' != '' And $(AndroidApplication)"

src/Xamarin.Android.Build.Tasks/Xamarin.Android.SkipCases.projitems

Lines changed: 0 additions & 187 deletions
This file was deleted.

0 commit comments

Comments
 (0)