Skip to content

Commit ff4c6d4

Browse files
[Xamarin.Android.Build.Tasks] move .NET 8 support to android-net8 workload (#9785)
Context: #9777 The problem with #9777, is it increases our install size by something like ~700MB with the following packs: * Microsoft.Android.Sdk.[platform] x 1 (current platform) * Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.[RID] x 4 RIDs * Microsoft.NETCore.App.Runtime.Mono.[RID] x 4 RIDs Some of .NET MAUI's CI machines are extremely tight on disk space, and we promptly filled the disk! Let's move these packs to a new `android-net8` workload, which can be installed separately. dotnet/android-libraries could simply install: dotnet workload install android-net8 Which would provision both `android` and `android-net8` workloads.
1 parent 70d135b commit ff4c6d4

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

build-tools/create-packs/Directory.Build.targets

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
<_NuGetSources Include="$(OutputPath.TrimEnd('\'))" />
125125
<_PreviewPacks Condition=" '$(AndroidLatestStableApiLevel)' != '$(AndroidLatestUnstableApiLevel)' " Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nuget-unsigned\Microsoft.Android.Ref.$(AndroidLatestUnstableApiLevel).*.nupkg" />
126126
<_InstallArguments Include="android" />
127+
<_InstallArguments Include="android-net8" />
127128
<_InstallArguments Include="android-$(AndroidLatestUnstableApiLevel)" Condition=" '@(_PreviewPacks->Count())' != '0' " />
128129
<_InstallArguments Include="--skip-manifest-update" />
129130
<_InstallArguments Include="--skip-sign-check" />

src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/WorkloadManifest.in.json

+11-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"packs": [
77
"Microsoft.Android.Sdk.net10",
88
"Microsoft.Android.Sdk.net9",
9-
"Microsoft.Android.Sdk.net8",
109
"Microsoft.Android.Ref.35",
1110
"Microsoft.Android.Runtime.Mono.35.android-arm",
1211
"Microsoft.Android.Runtime.Mono.35.android-arm64",
@@ -15,15 +14,23 @@
1514
"Microsoft.Android.Templates"
1615
],
1716
"platforms": [ "win-x64", "win-arm64", "linux-x64", "linux-arm64", "osx-x64", "osx-arm64" ],
18-
"extends" : [
19-
"microsoft-net-runtime-android-net8",
20-
"microsoft-net-runtime-android-aot-net8",
17+
"extends" : [
2118
"microsoft-net-runtime-android-net9",
2219
"microsoft-net-runtime-android-aot-net9",
2320
"microsoft-net-runtime-android",
2421
"microsoft-net-runtime-android-aot"
2522
]
2623
},
24+
"android-net8": {
25+
"description": ".NET SDK Workload for building .NET 8 Android applications.",
26+
"packs": [ "Microsoft.Android.Sdk.net8" ],
27+
"platforms": [ "win-x64", "win-arm64", "linux-x64", "linux-arm64", "osx-x64", "osx-arm64" ],
28+
"extends" : [
29+
"android",
30+
"microsoft-net-runtime-android-net8",
31+
"microsoft-net-runtime-android-aot-net8"
32+
]
33+
},
2734
"android-36": {
2835
"description": "Preview support for Android API-36.",
2936
"packs": [

0 commit comments

Comments
 (0)