Skip to content

Commit

Permalink
[Mono.Android] Bind Android 15 DP 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jpobst committed Feb 23, 2024
1 parent 7368487 commit df946c1
Show file tree
Hide file tree
Showing 15 changed files with 240,977 additions and 63 deletions.
12 changes: 6 additions & 6 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
<!-- 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>
<AndroidLatestStablePlatformId Condition="'$(AndroidLatestStablePlatformId)' == ''">$(AndroidLatestStableApiLevel)</AndroidLatestStablePlatformId>
<AndroidLatestStableFrameworkVersion Condition="'$(AndroidLatestStableFrameworkVersion)'==''">v14.0</AndroidLatestStableFrameworkVersion>
<AndroidLatestStableApiLevel Condition="'$(AndroidLatestStableApiLevel)' == ''">35</AndroidLatestStableApiLevel>
<AndroidLatestStablePlatformId Condition="'$(AndroidLatestStablePlatformId)' == ''">VanillaIceCream</AndroidLatestStablePlatformId>
<AndroidLatestStableFrameworkVersion Condition="'$(AndroidLatestStableFrameworkVersion)'==''">v15.0</AndroidLatestStableFrameworkVersion>
<!-- *Latest* *unstable* API level binding that we support; this can be the same as *stable* -->
<AndroidLatestUnstableApiLevel Condition="'$(AndroidLatestUnstableApiLevel)' == ''">34</AndroidLatestUnstableApiLevel>
<AndroidLatestUnstableApiLevel Condition="'$(AndroidLatestUnstableApiLevel)' == ''">35</AndroidLatestUnstableApiLevel>
<AndroidLatestUnstablePlatformId Condition="'$(AndroidLatestUnstablePlatformId)' == ''">$(AndroidLatestStableApiLevel)</AndroidLatestUnstablePlatformId>
<AndroidLatestUnstableFrameworkVersion Condition="'$(AndroidLatestUnstableFrameworkVersion)'==''">v14.0</AndroidLatestUnstableFrameworkVersion>
<AndroidLatestUnstableFrameworkVersion Condition="'$(AndroidLatestUnstableFrameworkVersion)'==''">v15.0</AndroidLatestUnstableFrameworkVersion>
<!-- The default API level used for $(TargetPlatformVersion) -->
<AndroidDefaultTargetDotnetApiLevel Condition=" '$(AndroidDefaultTargetDotnetApiLevel)' == '' ">34</AndroidDefaultTargetDotnetApiLevel>
<AndroidDefaultTargetDotnetApiLevel Condition=" '$(AndroidDefaultTargetDotnetApiLevel)' == '' ">35</AndroidDefaultTargetDotnetApiLevel>
<!-- The API level and TargetFrameworkVersion for the default Mono.Android.dll build -->
<AndroidApiLevel Condition=" '$(AndroidApiLevel)' == '' ">$(AndroidLatestStableApiLevel)</AndroidApiLevel>
<AndroidPlatformId Condition=" '$(AndroidPlatformId)' == '' ">$(AndroidLatestStablePlatformId)</AndroidPlatformId>
Expand Down
3 changes: 1 addition & 2 deletions Documentation/workflow/HowToAddNewApiLevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ the new platform will be downloaded to your local Android SDK.
### Generate `params.txt` File

- In `/external/Java.Interop/tools/param-name-importer`:
- Add new level to `generate.sh` and run
- *or* run manually: `param-name-importer.exe -source-stub-zip C:/Users/USERNAME/android-toolchain/sdk/platforms/android-S/android-stubs-src.jar -output-text api-S.params.txt -output-xml api-S.params.xml -verbose -framework-only`
- Run: `dotnet run -source-stub-zip C:/Users/USERNAME/android-toolchain/platforms/android-35/android-stubs-src.jar -output-text api-35.params.txt -output-xml api-35.params.xml -verbose -framework-only`
- Copy the produced `api-X.params.txt` file to `/src/Mono.Android/Profiles/`

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

static readonly string assemblyToValidate = "Mono.Android.dll";
Expand Down
3 changes: 2 additions & 1 deletion build-tools/api-merge/merge-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +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-35.xml.in" Level="35" />
</Inputs>
<Outputs>
<File Path="api-34.xml" LastLevel="34" />
<File Path="api-35.xml" LastLevel="35" />
</Outputs>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ stages:
avdAbi: x86
avdType: android-wear
deviceName: wear_square
androidSdkPlatforms: 34
pool:
vmImage: $(HostedMacImage)
workspace:
Expand Down
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 @@ -49,6 +49,6 @@ 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
value: VanillaIceCream
- name: ExcludedNightlyNUnitCategories
value: 'cat != SystemApplication & cat != TimeZoneInfo & cat != Localization'
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +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: "v15.0", framework: "v15.0"),
};

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +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-34-ext7_r02", apiLevel: "34", pkgRevision: "2"),
new AndroidPlatformComponent ("platform-VanillaIceCream_r01", apiLevel: "VanillaIceCream", pkgRevision: "1", isLatestStable: true),

new AndroidToolchainComponent ("sources-34_r01",
destDir: Path.Combine ("sources", "android-34"),
Expand Down
Loading

0 comments on commit df946c1

Please sign in to comment.