Skip to content

Commit fbb7f17

Browse files
committed
Merge branch 'main' into dev/grendel/clr-host
* main: Bump to dotnet/java-interop@57f7bc84 (#9724) [XABT] Fix Xamarin.Android.Build.Tasks.sln (#9782) [java-runtime, Mono.Android] Use `ApplicationRegistration.Context` (#9779) [Xamarin.Android.Build.Tasks] temporarily support .NET 8 in .NET 10 (#9777) Bump to dotnet/sdk@c0f88f2416 10.0.100-preview.2.25108.4 (#9775) [docs] update dotnetbuilds domain (#9772)
2 parents 3b9a407 + c7f9f5c commit fbb7f17

File tree

18 files changed

+143
-41
lines changed

18 files changed

+143
-41
lines changed

Documentation/guides/InstallBuildsFromMain.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ number, it should be *close enough* to work.
1515
You can guess what the URL is, if you need a specific version like
1616
`7.0.100-preview.6.22277.6`, for example:
1717

18-
* Windows x64: https://dotnetbuilds.azureedge.net/public/Sdk/7.0.100-preview.6.22277.6/dotnet-sdk-7.0.100-preview.6.22277.6-win-x64.exe
19-
* Windows arm64: https://dotnetbuilds.azureedge.net/public/Sdk/7.0.100-preview.6.22277.6/dotnet-sdk-7.0.100-preview.6.22277.6-win-arm64.exe
20-
* macOS x64: https://dotnetbuilds.azureedge.net/public/Sdk/7.0.100-preview.6.22277.6/dotnet-sdk-7.0.100-preview.6.22277.6-osx-x64.pkg
21-
* macOS arm64: https://dotnetbuilds.azureedge.net/public/Sdk/7.0.100-preview.6.22277.6/dotnet-sdk-7.0.100-preview.6.22277.6-osx-arm64.pkg
18+
* Windows x64: https://ci.dot.net/public/Sdk/7.0.100-preview.6.22277.6/dotnet-sdk-7.0.100-preview.6.22277.6-win-x64.exe
19+
* Windows arm64: https://ci.dot.net/public/Sdk/7.0.100-preview.6.22277.6/dotnet-sdk-7.0.100-preview.6.22277.6-win-arm64.exe
20+
* macOS x64: https://ci.dot.net/public/Sdk/7.0.100-preview.6.22277.6/dotnet-sdk-7.0.100-preview.6.22277.6-osx-x64.pkg
21+
* macOS arm64: https://ci.dot.net/public/Sdk/7.0.100-preview.6.22277.6/dotnet-sdk-7.0.100-preview.6.22277.6-osx-arm64.pkg
2222

2323
*See [WindowsOnArm64.md][3] for further details about Windows on Arm64.*
2424

Xamarin.Android.Build.Tasks.sln

+7-6
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.Andro
2727
EndProject
2828
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Android.Sdk.Analysis", "src\Microsoft.Android.Sdk.Analysis\Microsoft.Android.Sdk.Analysis.csproj", "{0D00DD34-3E94-4166-9DEE-12355E4C98A0}"
2929
EndProject
30-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src/Microsoft.Android.Sdk.Analysis", "src\Microsoft.Android.Sdk.Analysis", "{51DC774F-F0E2-4D4E-B600-ECA986E6DDEF}"
31-
EndProject
32-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C94E2376-716E-4183-9845-AFF254C5ADB7}"
33-
EndProject
3430
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Android.Sdk.Analysis.Tests", "src\Microsoft.Android.Sdk.Analysis\Tests\Microsoft.Android.Sdk.Analysis.Tests.csproj", "{B54CE553-1105-45BE-ABC2-2D8ABC4B1099}"
3531
EndProject
32+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
33+
EndProject
3634
Global
3735
GlobalSection(SharedMSBuildProjectFiles) = preSolution
3836
src\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems*{3f1f2f50-af1a-4a5a-bedb-193372f068d7}*SharedItemsImports = 5
@@ -95,13 +93,16 @@ Global
9593
HideSolutionNode = FALSE
9694
EndGlobalSection
9795
GlobalSection(NestedProjects) = preSolution
96+
{53E4ABF0-1085-45F9-B964-DCAE4B819998} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
97+
{2DD1EE75-6D8D-4653-A800-0A24367F7F38} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
98+
{16DB2680-399B-4111-AA26-6CDBBFA334D8} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
9899
{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
99100
{372E8E3E-29D5-4B4D-88A2-4711CD628C4E} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
100101
{DE40756E-57F6-4AF2-B155-55E3A88CCED8} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
102+
{DBDC804F-8406-4F5E-83C6-720CB0CB6C6F} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
101103
{3DE17662-DCD6-4F49-AF06-D39AACC8649A} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
102104
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
103-
{0D00DD34-3E94-4166-9DEE-12355E4C98A0} = {51DC774F-F0E2-4D4E-B600-ECA986E6DDEF}
104-
{B54CE553-1105-45BE-ABC2-2D8ABC4B1099} = {51DC774F-F0E2-4D4E-B600-ECA986E6DDEF}
105+
{B54CE553-1105-45BE-ABC2-2D8ABC4B1099} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
105106
EndGlobalSection
106107
GlobalSection(ExtensibilityGlobals) = postSolution
107108
SolutionGuid = {F32556C5-6FD4-4F1D-884A-DEDF2EE865F6}

build-tools/create-packs/Microsoft.NET.Sdk.Android.proj

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ about the various Microsoft.Android workloads.
3636
<ReplaceFileContents
3737
SourceFile="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.NET.Sdk.Android\WorkloadManifest.in.json"
3838
DestinationFile="$(WorkloadManifestJsonPath)"
39-
Replacements="@WORKLOAD_VERSION@=$(WorkloadVersion);@NET_PREVIOUS_VERSION@=$(AndroidNetPreviousVersion)">
39+
Replacements="@WORKLOAD_VERSION@=$(WorkloadVersion);@NET_PREVIOUS_VERSION@=$(AndroidNetPreviousVersion);@NET8_PREVIOUS_VERSION@=$(AndroidNet8PreviousVersion)">
4040
</ReplaceFileContents>
4141
<ReplaceFileContents
4242
SourceFile="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.NET.Sdk.Android\WorkloadManifest.in.targets"
4343
DestinationFile="$(WorkloadManifestTargetsPath)"
44-
Replacements="@NET_PREVIOUS_VERSION@=$(AndroidNetPreviousVersion)">
44+
Replacements="@NET_PREVIOUS_VERSION@=$(AndroidNetPreviousVersion);@NET8_PREVIOUS_VERSION@=$(AndroidNet8PreviousVersion)">
4545
</ReplaceFileContents>
4646

4747
<ItemGroup>

eng/Version.Details.xml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<Dependencies>
22
<ProductDependencies>
3-
<Dependency Name="Microsoft.NET.Sdk" Version="10.0.100-preview.2.25102.3">
3+
<Dependency Name="Microsoft.NET.Sdk" Version="10.0.100-preview.2.25108.4">
44
<Uri>https://github.com/dotnet/sdk</Uri>
5-
<Sha>d6bc7918c0be5005426fbbff43dfb622fc295142</Sha>
5+
<Sha>c0f88f2416d2e61f302411bdfbab3b2e87b9d35c</Sha>
66
</Dependency>
7-
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="10.0.0-preview.2.25101.4" CoherentParentDependency="Microsoft.NET.Sdk">
7+
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="10.0.0-preview.2.25107.7" CoherentParentDependency="Microsoft.NET.Sdk">
88
<Uri>https://github.com/dotnet/runtime</Uri>
9-
<Sha>e51af404d1ea26be4a3d8e51fe21cf2f09ad34dd</Sha>
9+
<Sha>7324dd154599807cad1e4c65b2fcf3acd0a01bfe</Sha>
1010
</Dependency>
11-
<Dependency Name="Microsoft.NETCore.App.Ref" Version="10.0.0-preview.2.25101.4" CoherentParentDependency="Microsoft.NET.Sdk">
11+
<Dependency Name="Microsoft.NETCore.App.Ref" Version="10.0.0-preview.2.25107.7" CoherentParentDependency="Microsoft.NET.Sdk">
1212
<Uri>https://github.com/dotnet/runtime</Uri>
13-
<Sha>e51af404d1ea26be4a3d8e51fe21cf2f09ad34dd</Sha>
13+
<Sha>7324dd154599807cad1e4c65b2fcf3acd0a01bfe</Sha>
1414
</Dependency>
15-
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport" Version="10.0.0-alpha.1.25059.1" CoherentParentDependency="Microsoft.NETCore.App.Ref">
15+
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport" Version="10.0.0-preview.2.25105.3" CoherentParentDependency="Microsoft.NETCore.App.Ref">
1616
<Uri>https://github.com/dotnet/emsdk</Uri>
17-
<Sha>0de3165cb0d56323b6caaf8e9916d4d9e72da32d</Sha>
17+
<Sha>c8c1ff004deb78cbd4b1599c96f9a19e9f09ca62</Sha>
1818
</Dependency>
19-
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.5-alpha.25069.2" CoherentParentDependency="Microsoft.NET.ILLink.Tasks">
19+
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.5-alpha.25078.1" CoherentParentDependency="Microsoft.NET.ILLink.Tasks">
2020
<Uri>https://github.com/dotnet/cecil</Uri>
21-
<Sha>2d5c8fb9aa8bd4c7fc085a73520061075c601655</Sha>
21+
<Sha>dfa03011d6474bd0e6c9d0363e4f3b18b99f2ad8</Sha>
2222
</Dependency>
2323
<!-- Previous .NET Android version -->
2424
<Dependency Name="Microsoft.Android.Sdk.Windows" Version="35.0.24">

eng/Versions.props

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
<Project>
22
<!--Package versions-->
33
<PropertyGroup>
4-
<MicrosoftNETSdkPackageVersion>10.0.100-preview.2.25102.3</MicrosoftNETSdkPackageVersion>
4+
<MicrosoftNETSdkPackageVersion>10.0.100-preview.2.25108.4</MicrosoftNETSdkPackageVersion>
55
<MicrosoftDotnetSdkInternalPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftDotnetSdkInternalPackageVersion>
6-
<MicrosoftNETILLinkTasksPackageVersion>10.0.0-preview.2.25101.4</MicrosoftNETILLinkTasksPackageVersion>
7-
<MicrosoftNETCoreAppRefPackageVersion>10.0.0-preview.2.25101.4</MicrosoftNETCoreAppRefPackageVersion>
6+
<MicrosoftNETILLinkTasksPackageVersion>10.0.0-preview.2.25107.7</MicrosoftNETILLinkTasksPackageVersion>
7+
<MicrosoftNETCoreAppRefPackageVersion>10.0.0-preview.2.25107.7</MicrosoftNETCoreAppRefPackageVersion>
88
<MicrosoftDotNetApiCompatPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetApiCompatPackageVersion>
99
<MicrosoftDotNetBuildTasksFeedPackageVersion>10.0.0-beta.24476.2</MicrosoftDotNetBuildTasksFeedPackageVersion>
10-
<MicrosoftNETWorkloadEmscriptenCurrentManifest100100TransportVersion>10.0.0-alpha.1.25059.1</MicrosoftNETWorkloadEmscriptenCurrentManifest100100TransportVersion>
10+
<MicrosoftNETWorkloadEmscriptenCurrentManifest100100TransportVersion>10.0.0-preview.2.25105.3</MicrosoftNETWorkloadEmscriptenCurrentManifest100100TransportVersion>
1111
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest100100TransportVersion)</MicrosoftNETWorkloadEmscriptenPackageVersion>
1212
<MicrosoftTemplateEngineTasksPackageVersion>7.0.100-rc.1.22410.7</MicrosoftTemplateEngineTasksPackageVersion>
13-
<MicrosoftDotNetCecilPackageVersion>0.11.5-alpha.25069.2</MicrosoftDotNetCecilPackageVersion>
13+
<MicrosoftDotNetCecilPackageVersion>0.11.5-alpha.25078.1</MicrosoftDotNetCecilPackageVersion>
1414
<SystemIOHashingPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</SystemIOHashingPackageVersion>
1515
<!-- Previous .NET Android version -->
1616
<MicrosoftAndroidSdkWindowsPackageVersion>35.0.24</MicrosoftAndroidSdkWindowsPackageVersion>
1717
<AndroidNetPreviousVersion>$(MicrosoftAndroidSdkWindowsPackageVersion)</AndroidNetPreviousVersion>
18+
<!-- To be removed before .NET 10 GA -->
19+
<AndroidNet8PreviousVersion>34.0.147</AndroidNet8PreviousVersion>
1820
</PropertyGroup>
1921
<PropertyGroup>
2022
<!-- Match the first three version numbers and append 00 -->

external/Java.Interop

Submodule Java.Interop updated 20 files

samples/NativeAOT/NativeAotRuntimeProvider.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package net.dot.jni.nativeaot;
22

33
import android.util.Log;
4+
import net.dot.android.ApplicationRegistration;
45

56
public class NativeAotRuntimeProvider
67
extends android.content.ContentProvider
@@ -20,9 +21,12 @@ public boolean onCreate() {
2021
@Override
2122
public void attachInfo(android.content.Context context, android.content.pm.ProviderInfo info) {
2223
Log.d(TAG, "NativeAotRuntimeProvider.attachInfo(): calling JavaInteropRuntime.init()…");
24+
if (context instanceof android.app.Application) {
25+
ApplicationRegistration.Context = context;
26+
}
2327
JavaInteropRuntime.init();
2428
// NOTE: only required for custom applications
25-
net.dot.android.ApplicationRegistration.registerApplications();
29+
ApplicationRegistration.registerApplications();
2630
super.attachInfo (context, info);
2731
}
2832

src/Mono.Android/Android.App/Application.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static Context Context {
1414
if (_context != null)
1515
return _context;
1616

17-
IntPtr klass = JNIEnv.FindClass ("mono/MonoPackageManager");
17+
IntPtr klass = JNIEnv.FindClass ("net/dot/android/ApplicationRegistration");
1818
try {
1919
IntPtr field = JNIEnv.GetStaticFieldID (klass, "Context", "Landroid/content/Context;");
2020
IntPtr lref = JNIEnv.GetStaticObjectField (klass, field);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// There are built-in delegates for these, but we no longer generate them in Mono.Android.dll
2+
// because bool is not a blittable type. But we still need them for pre-existing bindings.
3+
using System;
4+
5+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
6+
delegate bool _JniMarshal_PP_Z (IntPtr jnienv, IntPtr klass);
7+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
8+
delegate bool _JniMarshal_PPL_Z (IntPtr jnienv, IntPtr klass, IntPtr p0);
9+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
10+
delegate bool _JniMarshal_PPJ_Z (IntPtr jnienv, IntPtr klass, long p0);
11+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
12+
delegate void _JniMarshal_PPLZ_V (IntPtr jnienv, IntPtr klass, IntPtr p0, bool p1);
13+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
14+
delegate bool _JniMarshal_PPLL_Z (IntPtr jnienv, IntPtr klass, IntPtr p0, IntPtr p1);
15+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
16+
delegate bool _JniMarshal_PPIL_Z (IntPtr jnienv, IntPtr klass, int p0, IntPtr p1);
17+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
18+
delegate bool _JniMarshal_PPLII_Z (IntPtr jnienv, IntPtr klass, IntPtr p0, int p1, int p2);
19+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
20+
delegate bool _JniMarshal_PPLLJ_Z (IntPtr jnienv, IntPtr klass, IntPtr p0, IntPtr p1, long p2);
21+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
22+
delegate bool _JniMarshal_PPLIL_Z (IntPtr jnienv, IntPtr klass, IntPtr p0, int p1, IntPtr p2);
23+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
24+
delegate bool _JniMarshal_PPLLL_Z (IntPtr jnienv, IntPtr klass, IntPtr p0, IntPtr p1, IntPtr p2);
25+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
26+
delegate IntPtr _JniMarshal_PPIZI_L (IntPtr jnienv, IntPtr klass, int p0, bool p1, int p2);
27+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
28+
delegate bool _JniMarshal_PPLZZL_Z (IntPtr jnienv, IntPtr klass, IntPtr p0, bool p1, bool p2, IntPtr p3);
29+
[global::System.Runtime.InteropServices.UnmanagedFunctionPointer (global::System.Runtime.InteropServices.CallingConvention.Winapi)]
30+
delegate void _JniMarshal_PPZIIII_V (IntPtr jnienv, IntPtr klass, bool p0, int p1, int p2, int p3, int p4);

src/Mono.Android/Mono.Android.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
<Compile Include="Android.Icu\DateIntervalFormat.cs" />
9797
<Compile Include="Android.Net.Wifi.P2p\WifiP2pManager.cs" />
9898
<Compile Include="Android.Runtime\DynamicMethodNameCounter.cs" />
99+
<Compile Include="Android.Runtime\ExtraDelegates.cs" />
99100
<Compile Include="Android.Runtime\IJavaObjectValueMarshaler.cs" />
100101
<Compile Include="Android.Telecom\InCallService.cs" />
101102
<Compile Include="Android.Telephony.Mbms\StreamingService.cs" />

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

+16
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"packs": [
77
"Microsoft.Android.Sdk.net10",
88
"Microsoft.Android.Sdk.net9",
9+
"Microsoft.Android.Sdk.net8",
910
"Microsoft.Android.Ref.35",
1011
"Microsoft.Android.Runtime.Mono.35.android-arm",
1112
"Microsoft.Android.Runtime.Mono.35.android-arm64",
@@ -15,6 +16,8 @@
1516
],
1617
"platforms": [ "win-x64", "win-arm64", "linux-x64", "linux-arm64", "osx-x64", "osx-arm64" ],
1718
"extends" : [
19+
"microsoft-net-runtime-android-net8",
20+
"microsoft-net-runtime-android-aot-net8",
1821
"microsoft-net-runtime-android-net9",
1922
"microsoft-net-runtime-android-aot-net9",
2023
"microsoft-net-runtime-android",
@@ -61,6 +64,19 @@
6164
"linux-arm64": "Microsoft.Android.Sdk.Linux"
6265
}
6366
},
67+
"Microsoft.Android.Sdk.net8": {
68+
"kind": "sdk",
69+
"version": "@NET8_PREVIOUS_VERSION@",
70+
"alias-to": {
71+
"osx-x64": "Microsoft.Android.Sdk.Darwin",
72+
"osx-arm64": "Microsoft.Android.Sdk.Darwin",
73+
"win-x86": "Microsoft.Android.Sdk.Windows",
74+
"win-x64": "Microsoft.Android.Sdk.Windows",
75+
"win-arm64": "Microsoft.Android.Sdk.Windows",
76+
"linux-x64": "Microsoft.Android.Sdk.Linux",
77+
"linux-arm64": "Microsoft.Android.Sdk.Linux"
78+
}
79+
},
6480
"Microsoft.Android.Ref.35": {
6581
"kind": "framework",
6682
"version": "@WORKLOAD_VERSION@"

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

+12-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '10.0')) " />
55
<Import Project="Sdk.targets" Sdk="Microsoft.Android.Sdk.net9"
66
Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '9.0')) " />
7+
<Import Project="Sdk.targets" Sdk="Microsoft.Android.Sdk.net8"
8+
Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) " />
79
<Import Project="Eol.targets" Sdk="Microsoft.Android.Sdk.net10"
8-
Condition=" $([MSBuild]::VersionLessThanOrEquals($(TargetFrameworkVersion), '8.0')) " />
10+
Condition=" $([MSBuild]::VersionLessThanOrEquals($(TargetFrameworkVersion), '7.0')) " />
911
</ImportGroup>
1012

1113
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '9.0')) ">
@@ -16,7 +18,15 @@
1618
/>
1719
</ItemGroup>
1820

19-
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '9.0')) ">
21+
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) ">
22+
<KnownFrameworkReference
23+
Update="Microsoft.Android"
24+
LatestRuntimeFrameworkVersion="@NET8_PREVIOUS_VERSION@"
25+
TargetingPackVersion="@NET8_PREVIOUS_VERSION@"
26+
/>
27+
</ItemGroup>
28+
29+
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '8.0')) ">
2030
<SdkSupportedTargetPlatformIdentifier Include="android" DisplayName="Android" />
2131
</ItemGroup>
2232
</Project>

src/Xamarin.Android.Build.Tasks/Resources/ApplicationRegistration.java

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
public class ApplicationRegistration {
44

5+
public static android.content.Context Context;
6+
57
public static void registerApplications ()
68
{
79
// REGISTER_APPLICATION_AND_INSTRUMENTATION_CLASSES_HERE

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs

+11-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public void DotNetNew ([Values ("android", "androidlib", "android-bindinglib", "
4646
}
4747

4848
static readonly object[] DotNetPackTargetFrameworks = new object[] {
49+
new object[] {
50+
"net8.0",
51+
"android",
52+
34,
53+
},
4954
new object[] {
5055
"net9.0",
5156
"android",
@@ -145,6 +150,11 @@ public String Say (String quote) {
145150
}
146151

147152
static readonly object[] DotNetTargetFrameworks = new object[] {
153+
new object[] {
154+
"net8.0",
155+
"android",
156+
34,
157+
},
148158
new object[] {
149159
"net9.0",
150160
"android",
@@ -200,7 +210,7 @@ public void DotNetPublish ([Values (false, true)] bool isRelease, [ValueSource(n
200210
var apiLevel = (int)data[2];
201211

202212
//FIXME: will revisit this in a future PR
203-
if (dotnetVersion == "net9.0") {
213+
if (dotnetVersion != "net10.0") {
204214
Assert.Ignore ("error NETSDK1185: The Runtime Pack for FrameworkReference 'Microsoft.Android.Runtime.34.android-arm' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true.");
205215
}
206216

0 commit comments

Comments
 (0)