Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mono.Android] Bind and enumify API-35 Beta 3. #9043

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Configuration.Override.props.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
kept consistent with each other, lest Bad Things Happen™
-->
<!-- The default Android API level to bind in src/Mono.Android -->
<AndroidApiLevel>34</AndroidApiLevel>
<AndroidApiLevel>35</AndroidApiLevel>
<!-- The Xamarin.Android $(TargetFrameworkVersion) value that corresponds to $(AndroidApiLevel) -->
<AndroidFrameworkVersion>v14.0</AndroidFrameworkVersion>
<AndroidFrameworkVersion>v15.0</AndroidFrameworkVersion>
<!-- The default Android API "id" that corresponds to $(AndroidApiLevel) -->
<AndroidPlatformId>34</AndroidPlatformId>
<AndroidPlatformId>35</AndroidPlatformId>

<!--
Colon-separated list of ABIs to build the mono JIT for.
Expand Down
10 changes: 5 additions & 5 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<!-- The min API level supported by Microsoft.Android.Sdk -->
<AndroidMinimumDotNetApiLevel Condition="'$(AndroidMinimumDotNetApiLevel)' == ''">21</AndroidMinimumDotNetApiLevel>
<!-- *Latest* *stable* API level binding that we support; used when building src/Xamarin.Android.Build.Tasks -->
<AndroidLatestStableApiLevel Condition="'$(AndroidLatestStableApiLevel)' == ''">34</AndroidLatestStableApiLevel>
<AndroidLatestStableApiLevel Condition="'$(AndroidLatestStableApiLevel)' == ''">35</AndroidLatestStableApiLevel>
<AndroidLatestStablePlatformId Condition="'$(AndroidLatestStablePlatformId)' == ''">$(AndroidLatestStableApiLevel)</AndroidLatestStablePlatformId>
<AndroidLatestStableFrameworkVersion Condition="'$(AndroidLatestStableFrameworkVersion)'==''">v14.0</AndroidLatestStableFrameworkVersion>
<AndroidLatestStableFrameworkVersion Condition="'$(AndroidLatestStableFrameworkVersion)'==''">v15.0</AndroidLatestStableFrameworkVersion>
<!-- *Latest* *unstable* API level binding that we support; this can be the same as *stable* -->
<AndroidLatestUnstableApiLevel Condition="'$(AndroidLatestUnstableApiLevel)' == ''">35</AndroidLatestUnstableApiLevel>
<AndroidLatestUnstablePlatformId Condition="'$(AndroidLatestUnstablePlatformId)' == ''">VanillaIceCream</AndroidLatestUnstablePlatformId>
<AndroidLatestUnstableFrameworkVersion Condition="'$(AndroidLatestUnstableFrameworkVersion)'==''">v14.0.99</AndroidLatestUnstableFrameworkVersion>
<AndroidLatestUnstableApiLevel Condition="'$(AndroidLatestUnstableApiLevel)' == ''">$(AndroidLatestStableApiLevel)</AndroidLatestUnstableApiLevel>
<AndroidLatestUnstablePlatformId Condition="'$(AndroidLatestUnstablePlatformId)' == ''">$(AndroidLatestStablePlatformId)</AndroidLatestUnstablePlatformId>
<AndroidLatestUnstableFrameworkVersion Condition="'$(AndroidLatestUnstableFrameworkVersion)'==''">$(AndroidLatestStableFrameworkVersion)</AndroidLatestUnstableFrameworkVersion>
<!-- The default API level used for $(TargetPlatformVersion) -->
<AndroidDefaultTargetDotnetApiLevel Condition=" '$(AndroidDefaultTargetDotnetApiLevel)' == '' ">$(AndroidLatestStableApiLevel)</AndroidDefaultTargetDotnetApiLevel>
<!-- The API level and TargetFrameworkVersion for the default Mono.Android.dll build -->
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* Major/Minor match Android stable API level, such as 30.0 for API 30.
* Bump first digit of the patch version for feature releases (and reset the first two digits to 0)
-->
<AndroidPackVersion>34.99.0</AndroidPackVersion>
<AndroidPackVersion>35.0.0</AndroidPackVersion>
<AndroidPackVersionSuffix>preview.7</AndroidPackVersionSuffix>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed class CheckApiCompatibility : Task
{ "v12.1", "v12.0" },
{ "v13.0", "v12.1" },
{ "v14.0", "v13.0" },
{ "v14.0.99", "v14.0" },
{ "v15.0", "v14.0" },
};

static readonly string assemblyToValidate = "Mono.Android.dll";
Expand Down Expand Up @@ -70,7 +70,6 @@ public sealed class CheckApiCompatibility : Task
public override bool Execute ()
{
Log.LogMessage (MessageImportance.High, $"CheckApiCompatibility for ApiLevel: {ApiLevel}");
Log.LogWarning ($"# jonp: TargetFramework={TargetFramework}");

// Check to see if Api has a previous Api defined.
if (!api_versions.TryGetValue (ApiLevel, out string previousApiLevel)) {
Expand Down
4 changes: 2 additions & 2 deletions build-tools/api-merge/merge-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<File Path="api-32.xml.in" Level="32" />
<File Path="api-33.xml.in" Level="33" />
<File Path="api-34.xml.in" Level="34" />
<File Path="api-VanillaIceCream.xml.in" Level="35" />
<File Path="api-35.xml.in" Level="35" />
</Inputs>
<Outputs>
<File Path="api-VanillaIceCream.xml" LastLevel="35" />
<File Path="api-35.xml" LastLevel="35" />
</Outputs>
</Configuration>
2 changes: 1 addition & 1 deletion build-tools/automation/yaml-templates/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ variables:
- name: IsRelOrTargetingRel
value: $[or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['System.PullRequest.TargetBranch'], 'release/'))]
- name: DefaultTestSdkPlatforms # Comma-separated SDK Platform(s) to install on test agents (no spaces)
value: 34,VanillaIceCream
value: 35
- name: ExcludedNightlyNUnitCategories
value: 'cat != SystemApplication & cat != TimeZoneInfo & cat != Localization'
- name: RunMAUITestJob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class BuildAndroidPlatforms
new AndroidPlatform (apiName: "Sv2", apiLevel: 32, platformID: "32", include: "v12.1"),
new AndroidPlatform (apiName: "Tiramisu", apiLevel: 33, platformID: "33", include: "v13.0", framework: "v13.0"),
new AndroidPlatform (apiName: "UpsideDownCake", apiLevel: 34, platformID: "34", include: "v14.0", framework: "v14.0"),
new AndroidPlatform (apiName: "VanillaIceCream", apiLevel: 35, platformID: "VanillaIceCream", include: "v14.0.99", framework: "v14.0.99", stable: false),
new AndroidPlatform (apiName: "VanillaIceCream", apiLevel: 35, platformID: "35", include: "v15.0", framework: "v15.0"),
};

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public AndroidToolchain ()
new AndroidPlatformComponent ("platform-31_r01", apiLevel: "31", pkgRevision: "1"),
new AndroidPlatformComponent ("platform-32_r01", apiLevel: "32", pkgRevision: "1"),
new AndroidPlatformComponent ("platform-33-ext3_r03", apiLevel: "33", pkgRevision: "3"),
new AndroidPlatformComponent ("platform-34-ext7_r02", apiLevel: "34", pkgRevision: "2", isLatestStable: true),
new AndroidPlatformComponent ("platform-VanillaIceCream_r04", apiLevel: "VanillaIceCream", pkgRevision: "4", isLatestStable: true),
new AndroidPlatformComponent ("platform-34-ext7_r02", apiLevel: "34", pkgRevision: "2"),
new AndroidPlatformComponent ("platform-35_r01", apiLevel: "35", pkgRevision: "1", isLatestStable: true),

new AndroidToolchainComponent ("sources-34_r01",
destDir: Path.Combine ("sources", "android-34"),
Expand Down
17 changes: 17 additions & 0 deletions src/Mono.Android/Android.Net.Wifi.P2p/WifiP2pManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using Android.Runtime;

namespace Android.Net.Wifi.P2p
{
// This was converted to an enum in .NET 9
dellis1972 marked this conversation as resolved.
Show resolved Hide resolved
partial class WifiP2pManager
{
// Metadata.xml XPath field reference: path="/api/package[@name='android.net.wifi.p2p']/class[@name='WifiP2pManager']/field[@name='WIFI_P2P_DISCOVERY_STARTED']"
[Register ("WIFI_P2P_DISCOVERY_STARTED")]
public const int WifiP2pDiscoveryStarted = (int) 2;

// Metadata.xml XPath field reference: path="/api/package[@name='android.net.wifi.p2p']/class[@name='WifiP2pManager']/field[@name='WIFI_P2P_DISCOVERY_STOPPED']"
[Register ("WIFI_P2P_DISCOVERY_STOPPED")]
public const int WifiP2pDiscoveryStopped = (int) 1;
}
}
1 change: 1 addition & 0 deletions src/Mono.Android/Mono.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<Compile Include="Android.Icu\ListFormatter.cs" />
<Compile Include="Android.Icu\RelativeDateTimeFormatter.cs" />
<Compile Include="Android.Icu\DateIntervalFormat.cs" />
<Compile Include="Android.Net.Wifi.P2p\WifiP2pManager.cs" />
<Compile Include="Android.Runtime\DynamicMethodNameCounter.cs" />
<Compile Include="Android.Runtime\IJavaObjectValueMarshaler.cs" />
<Compile Include="Android.Telecom\InCallService.cs" />
Expand Down
Loading
Loading