Skip to content

Commit e9f3143

Browse files
authored
[Mono.Android] Bind API-UpsideDownCake Developer Preview 1 (#7796)
Context: https://developer.android.com/about/versions/14 Android 14 [Developer Preview 1][0] was released on 2023-Feb-08: * [API diff vs. API-33][1] The Android 14 Preview [Timeline, milestones, and updates][2] section suggests the following timeline: * February: Developer Preview 1 * March: Developer Preview 2 * April: Beta 1 * May: Beta 2 * June: Beta 3 with "First [Platform Stability][3] milestone including final APIs and behaviors. Play publishing also opens." * July: Beta 4+ * ???: Final release ~~ Acceptable Breakages ~~ * Type `Dalvik.SystemInterop.DexFile` was un-deprecated. A new nested [`DexFile.OptimizationInfo`][4] class was added. ~~ TODO ~~ We need to update `Mono.Android.dll` API compatibility to work with the .NET Android versioning scheme, *not* the Classic Xamarin.Android versioning scheme. [0]: https://android-developers.googleblog.com/2023/02/first-developer-preview-android14.html [1]: https://web.archive.org/web/20230216110929/https://developer.android.com/sdk/api_diff/u-dp1/changes [2]: https://web.archive.org/web/20230228205527/https://developer.android.com/about/versions/14/overview#timeline [3]: https://web.archive.org/web/20230228205527/https://developer.android.com/about/versions/14/overview#platform_stability [4]: https://developer.android.com/reference/dalvik/system/DexFile.OptimizationInfo?hl=en
1 parent 16806ca commit e9f3143

File tree

16 files changed

+37585
-14
lines changed

16 files changed

+37585
-14
lines changed

Configuration.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
<AndroidLatestStablePlatformId Condition="'$(AndroidLatestStablePlatformId)' == ''">$(AndroidLatestStableApiLevel)</AndroidLatestStablePlatformId>
3030
<AndroidLatestStableFrameworkVersion Condition="'$(AndroidLatestStableFrameworkVersion)'==''">v13.0</AndroidLatestStableFrameworkVersion>
3131
<!-- *Latest* *unstable* API level binding that we support; this can be the same as *stable* -->
32-
<AndroidLatestUnstableApiLevel Condition="'$(AndroidLatestUnstableApiLevel)' == ''">$(AndroidLatestStableApiLevel)</AndroidLatestUnstableApiLevel>
33-
<AndroidLatestUnstablePlatformId Condition="'$(AndroidLatestUnstablePlatformId)' == ''">Tiramisu</AndroidLatestUnstablePlatformId>
34-
<AndroidLatestUnstableFrameworkVersion Condition="'$(AndroidLatestUnstableFrameworkVersion)'==''">v13.0</AndroidLatestUnstableFrameworkVersion>
32+
<AndroidLatestUnstableApiLevel Condition="'$(AndroidLatestUnstableApiLevel)' == ''">34</AndroidLatestUnstableApiLevel>
33+
<AndroidLatestUnstablePlatformId Condition="'$(AndroidLatestUnstablePlatformId)' == ''">UpsideDownCake</AndroidLatestUnstablePlatformId>
34+
<AndroidLatestUnstableFrameworkVersion Condition="'$(AndroidLatestUnstableFrameworkVersion)'==''">v13.0.99</AndroidLatestUnstableFrameworkVersion>
3535
<!-- The default API level used for $(TargetPlatformVersion) -->
3636
<AndroidDefaultTargetDotnetApiLevel Condition=" '$(AndroidDefaultTargetDotnetApiLevel)' == '' ">33</AndroidDefaultTargetDotnetApiLevel>
3737
<!-- The API level and TargetFrameworkVersion for the default Mono.Android.dll build -->

build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/CheckApiCompatibility.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public sealed class CheckApiCompatibility : Task
3131
{ "v12.0", "v11.0" },
3232
{ "v12.1", "v12.0" },
3333
{ "v13.0", "v12.1" },
34+
{ "v13.0.99", "v13.0" },
3435
};
3536

3637
static readonly string assemblyToValidate = "Mono.Android.dll";

build-tools/api-merge/merge-configuration.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<File Path="api-31.xml.in" Level="31" />
2323
<File Path="api-32.xml.in" Level="32" />
2424
<File Path="api-33.xml.in" Level="33" />
25+
<File Path="api-UpsideDownCake.xml.in" Level="34" />
2526
</Inputs>
2627
<Outputs>
2728
<File Path="api-19.xml" LastLevel="19" />
@@ -39,5 +40,6 @@
3940
<File Path="api-31.xml" LastLevel="31" />
4041
<File Path="api-32.xml" LastLevel="32" />
4142
<File Path="api-33.xml" LastLevel="33" />
43+
<File Path="api-UpsideDownCake.xml" LastLevel="34" />
4244
</Outputs>
4345
</Configuration>

build-tools/api-xml-adjuster/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ API_XML_TOOL = $(BUILDBIN)/api-xml-adjuster.exe
1717
RUNTIME = mono --debug
1818
RUN_CLASS_PARSE = $(RUNTIME) $(CLASS_PARSE)
1919
RUN_API_XML_TOOL = $(RUNTIME) $(API_XML_TOOL)
20-
API_LEVELS = 33
20+
API_LEVELS = 33 UpsideDownCake
2121

2222
XML_OUTPUT_DIR = .
2323

build-tools/automation/azure-pipelines.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ variables:
5858
- name: ExcludedNUnitCategories
5959
value: '& cat != DotNetIgnore & cat != HybridAOT & cat != MkBundle & cat != MonoSymbolicate & cat != PackagesConfig & cat != StaticProject & cat != SystemApplication'
6060
- name: DefaultTestSdkPlatforms # Comma-separated SDK Platform(s) to install on test agents (no spaces)
61-
value: 33
61+
value: 33,UpsideDownCake
6262
- ${{ if eq(variables['Build.DefinitionName'], 'Xamarin.Android-Private') }}:
6363
- group: AzureDevOps-Artifact-Feeds-Pats
6464
- group: DotNet-MSRC-Storage
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<PoliCheckExclusions>
22
<!-- Each of these exclusions is a folder name - if \[name]\ exists in the file path, it will be skipped -->
33
<Exclusion Type="FolderPathFull">LICENSE-DATA|NREFACTORY|LOCALIZE</Exclusion>
4+
<Exclusion Type="FolderPathStart">src\Mono.Android\Profiles</Exclusion>
45
<!-- Each of these exclusions is a folder name - if any folder or file starts with "\[name]", it will be skipped -->
56
<!--<Exclusion Type="FolderPathStart">ABC|XYZ</Exclusion>-->
67
<!-- Each of these file types will be completely skipped for the entire scan -->
78
<!--<Exclusion Type="FileType">.ABC|.XYZ</Exclusion>-->
89
<!-- The specified file names will be skipped during the scan regardless which folder they are in -->
9-
<Exclusion Type="FileName">REMAINING-INT-CONSTS.TXT|TAIWANCALENDAR.XML|XAMARIN-ANDROID-SDK-9.XML|SQLITE3.C|MAP.CSV|METHODMAP.EXT.CSV|EXTERNALWHITELIST.CSV|SYMBOLARCHIVEWHITELIST.CSV|POLICHECK.EXCLUSIONS.xml
10-
|API-10.PARAMS.TXT|API-15.PARAMS.TXT|API-16.PARAMS.TXT|API-17.PARAMS.TXT|API-18.PARAMS.TXT|API-19.PARAMS.TXT|API-20.PARAMS.TXT|API-21.PARAMS.TXT|API-22.PARAMS.TXT|API-23.PARAMS.TXT|API-24.PARAMS.TXT
11-
|API-25.PARAMS.TXT|API-26.PARAMS.TXT|API-27.PARAMS.TXT|API-28.PARAMS.TXT|API-29.PARAMS.TXT|API-30.PARAMS.TXT|API-31.PARAMS.TXT|API-32.PARAMS.TXT|API-33.PARAMS.TXT
12-
</Exclusion>
10+
<Exclusion Type="FileName">REMAINING-INT-CONSTS.TXT|TAIWANCALENDAR.XML|XAMARIN-ANDROID-SDK-9.XML|SQLITE3.C|MAP.CSV|METHODMAP.EXT.CSV|EXTERNALWHITELIST.CSV|SYMBOLARCHIVEWHITELIST.CSV|POLICHECK.EXCLUSIONS.xml</Exclusion>
1311
</PoliCheckExclusions>

build-tools/installers/create-installers.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<Target Name="_FindFrameworkDirs">
3838
<ItemGroup>
3939
<_FrameworkDirs Include="@(AndroidApiInfo->'$(FrameworkSrcDir)%(Identity)\')" />
40-
<_FrameworkDirsThatExist Condition="Exists('%(Identity)')" Include="@(_FrameworkDirs)" />
40+
<_FrameworkDirsThatExist Condition="Exists('%(Identity)')" Include="@(_FrameworkDirs)" Exclude="$(FrameworkSrcDir)v13.0.99\" />
4141
<_EarlierFrameworkDir Include="@(_FrameworkDirsThatExist)" Exclude="$(_LatestStableFrameworkDir)" />
4242
</ItemGroup>
4343
</Target>

build-tools/xaprepare/xaprepare/ConfigAndData/BuildAndroidPlatforms.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class BuildAndroidPlatforms
4444
new AndroidPlatform (apiName: "S", apiLevel: 31, platformID: "31", include: "v12.0"),
4545
new AndroidPlatform (apiName: "Sv2", apiLevel: 32, platformID: "32", include: "v12.1"),
4646
new AndroidPlatform (apiName: "Tiramisu", apiLevel: 33, platformID: "33", include: "v13.0", framework: "v13.0"),
47+
new AndroidPlatform (apiName: "UpsideDownCake", apiLevel: 34, platformID: "UpsideDownCake", include: "v13.0.99",framework: "v13.0.99", stable: false),
4748
};
4849

4950
public static readonly Dictionary<string, uint> NdkMinimumAPIMap = new Dictionary<string, uint> {

build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/AndroidToolchain.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public AndroidToolchain ()
7373
new AndroidPlatformComponent ("platform-31_r01", apiLevel: "31", pkgRevision: "1"),
7474
new AndroidPlatformComponent ("platform-32_r01", apiLevel: "32", pkgRevision: "1"),
7575
new AndroidPlatformComponent ("platform-33_r01", apiLevel: "33", pkgRevision: "1"),
76+
new AndroidPlatformComponent ("platform-UpsideDownCake_r01", apiLevel: "UpsideDownCake", pkgRevision: "1"),
7677

7778
new AndroidToolchainComponent ("sources-33_r01",
7879
destDir: Path.Combine ("sources", "android-33"),

src/Mono.Android.Runtime/Mono.Android.Runtime.csproj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,18 @@
3131

3232
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
3333

34-
<!-- Only build the .NET 6+ version of 'Mono.Android.Export.dll' for the latest stable Android version. -->
35-
<PropertyGroup Condition=" '$(AndroidApiLevel)' != '$(AndroidLatestStableApiLevel)' ">
34+
<!-- Only build the .NET 6+ version of 'Mono.Android.Runtime.dll' for the latest stable Android version. -->
35+
<PropertyGroup Condition=" '$(TargetFramework)' != 'monoandroid10' And '$(AndroidApiLevel)' &lt; '$(AndroidDefaultTargetDotnetApiLevel)' ">
3636
<BuildDependsOn></BuildDependsOn>
3737
</PropertyGroup>
38-
38+
39+
<!-- Do not build classic for API versions above 33 -->
40+
<PropertyGroup Condition=" '$(TargetFramework)' == 'monoandroid10' And '$(AndroidApiLevel)' &gt; '33'">
41+
<BuildDependsOn></BuildDependsOn>
42+
</PropertyGroup>
43+
3944
<!-- Copy .NET ref/runtime assemblies to bin/$(Configuration)/dotnet/packs folder -->
40-
<PropertyGroup Condition=" '$(AndroidApiLevel)' == '$(AndroidLatestStableApiLevel)' ">
45+
<PropertyGroup Condition=" '$(TargetFramework)' != 'monoandroid10' And '$(AndroidApiLevel)' &gt;= '$(AndroidDefaultTargetDotnetApiLevel)' ">
4146
<BuildDependsOn>
4247
$(BuildDependsOn);
4348
_CopyToPackDirs;

0 commit comments

Comments
 (0)