Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tasks] remove Xamarin.Android.Legacy.targets a…
Browse files Browse the repository at this point in the history
…nd friends (#7985)

Taking a first pass at deleting MSBuild-related files that are not
used in .NET 8 and only existed to support "classic" Xamarin.Android.

Deleting:

* `Xamarin.Android.Legacy.targets`
* `Xamarin.Android.Aapt.targets`
* `Xamarin.Android.Wear.targets`
* Associated MSBuild task `.cs` files that are now unused

After these changes, I got the error from
`Xamarin.Android.NUnitLite.csproj`:

    Xamarin.Android.Tooling.targets(52,31): error MSB4057: The target "_GetReferenceAssemblyPaths" does not exist in the project.

I removed this project from `Xamarin.Android.sln` and `GeneratedMakeRulesFile.cs`
for now, but it will be a good target for removal in the future.
  • Loading branch information
jonathanpeppers authored Apr 24, 2023
1 parent 8d6252a commit decd1b5
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 1,635 deletions.
10 changes: 0 additions & 10 deletions Xamarin.Android.sln
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.Cecil",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "monodroid", "src\monodroid\monodroid.csproj", "{53EE4C57-1C03-405A-8243-8DA539546C88}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.NUnitLite", "src\Xamarin.Android.NUnitLite\Xamarin.Android.NUnitLite.csproj", "{4D603AA3-3BFD-43C8-8050-0CD6C2601126}"
ProjectSection(ProjectDependencies) = postProject
{3F1F2F50-AF1A-4A5A-BEDB-193372F068D7} = {3F1F2F50-AF1A-4A5A-BEDB-193372F068D7}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CAB438D8-B0F5-4AF0-BEBD-9E2ADBD7B483}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.ProjectTools", "src\Xamarin.Android.Build.Tasks\Tests\Xamarin.ProjectTools\Xamarin.ProjectTools.csproj", "{2DD1EE75-6D8D-4653-A800-0A24367F7F38}"
Expand Down Expand Up @@ -226,10 +221,6 @@ Global
{53EE4C57-1C03-405A-8243-8DA539546C88}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{53EE4C57-1C03-405A-8243-8DA539546C88}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{53EE4C57-1C03-405A-8243-8DA539546C88}.Release|AnyCPU.Build.0 = Release|Any CPU
{4D603AA3-3BFD-43C8-8050-0CD6C2601126}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{4D603AA3-3BFD-43C8-8050-0CD6C2601126}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{4D603AA3-3BFD-43C8-8050-0CD6C2601126}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{4D603AA3-3BFD-43C8-8050-0CD6C2601126}.Release|AnyCPU.Build.0 = Release|Any CPU
{2DD1EE75-6D8D-4653-A800-0A24367F7F38}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{2DD1EE75-6D8D-4653-A800-0A24367F7F38}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{2DD1EE75-6D8D-4653-A800-0A24367F7F38}.Release|AnyCPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -423,7 +414,6 @@ Global
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870} = {864062D3-A415-4A6F-9324-5820237BA058}
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD} = {864062D3-A415-4A6F-9324-5820237BA058}
{53EE4C57-1C03-405A-8243-8DA539546C88} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{4D603AA3-3BFD-43C8-8050-0CD6C2601126} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{2DD1EE75-6D8D-4653-A800-0A24367F7F38} = {CAB438D8-B0F5-4AF0-BEBD-9E2ADBD7B483}
{53E4ABF0-1085-45F9-B964-DCAE4B819998} = {CAB438D8-B0F5-4AF0-BEBD-9E2ADBD7B483}
{38C762AB-8FD1-44DE-9855-26AAE7129DC3} = {864062D3-A415-4A6F-9324-5820237BA058}
Expand Down
3 changes: 0 additions & 3 deletions build-tools/installers/create-installers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.Collections.Immutable.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.Buffers.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.IO.Hashing.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Aapt.targets" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Aapt2.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Analysis.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Application.targets" />
Expand Down Expand Up @@ -299,7 +298,6 @@
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.EmbeddedResource.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.FSharp.targets" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Javac.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Legacy.targets" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.PCLSupport.props" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.PCLSupport.targets" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.SkipCases.projitems" />
Expand All @@ -310,7 +308,6 @@
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Tools.AndroidSdk.pdb" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Tools.Versions.props" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.VisualBasic.targets" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Wear.targets" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Build.AsyncTask.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Build.AsyncTask.pdb" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)K4os.Compression.LZ4.dll" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@ void Generate (Context context, StreamWriter sw)
string firstFramework = frameworks [0];
string latestStableFramework = stableFrameworks [stableFrameworks.Count - 1];

WriteMSBuildCall (
fileToRemovePath: Path.Combine (monoFrameworksRoot, "v1.0", "Xamarin.Android.NUnitLite.dll"),
projectPath: "src/Xamarin.Android.NUnitLite/Xamarin.Android.NUnitLite.csproj"
);

WriteMSBuildCall (
fileToRemovePath: $"{monoFrameworksRoot}/{latestStableFramework}/Mono.Android.Export.*",
projectPath: "src/Mono.Android.Export/Mono.Android.Export.csproj"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
***********************************************************************************************
Microsoft.Android.Sdk.Aot.targets
.NET 6 AOT support. You can find "legacy" Xamarin.Android AOT support
in Xamarin.Android.Legacy.targets.
MSBuild targets for .NET 6+ AOT support.
For <MonoAOTCompiler/> usage, see:
* https://github.com/dotnet/runtime/blob/15dec9a2aa5a4236d6ba70de2e9c146867b9d2e0/src/tasks/AotCompilerTask/MonoAOTCompiler.cs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
***********************************************************************************************
Microsoft.Android.Sdk.BuildOrder.targets
This file contains the .NET 5-specific setup for any $(FooDependsOn)
properties that determine build ordering. For "legacy" Xamarin.Android
projects, these properties are set in Xamarin.Android.Legacy.targets.
This file contains the .NET 6+ setup for any $(FooDependsOn)
properties that determine build ordering.
***********************************************************************************************
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
***********************************************************************************************
Microsoft.Android.Sdk.Tooling.targets
This file contains .NET 5-specific calls to the <ValidateJavaVersion/>
and <ResolveAndroidTooling/> MSBuild tasks. These MSBuild tasks are
called for "legacy" projects in Xamarin.Android.Legacy.targets.
This file contains .NET 6+ calls to the <ValidateJavaVersion/> and
<ResolveAndroidTooling/> MSBuild tasks.
***********************************************************************************************
-->
Expand Down
Loading

0 comments on commit decd1b5

Please sign in to comment.