1
1
# HowTo: Add a new Android API Level
2
2
3
- ## Developer Preview
3
+ ## Unstable Previews
4
4
5
- The first developer preview generally ships in late February or early March. At this early
5
+ The first unstable preview generally ships in late February or early March. At this early
6
6
stage for the APIs, we simply add literal bindings for them. We do not spend resources on
7
7
the more manual parts like enumification that will likely change as the APIs mature.
8
8
@@ -13,22 +13,32 @@ the more manual parts like enumification that will likely change as the APIs mat
13
13
- Add new level to ` /build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/AndroidToolchain.cs ` :
14
14
- ` new AndroidPlatformComponent ("platform-S_r01", apiLevel: "S", pkgRevision: "1"), `
15
15
16
- At this point, you can run ` Xamarin.Android.sln / t:Prepare ` using your usual mechanism, and
16
+ At this point, you can run ` Xamarin.Android.sln - t:Prepare ` using your usual mechanism, and
17
17
the new platform will be downloaded to your local Android SDK.
18
18
19
+ ### Build Xamarin.Android
20
+
21
+ Build ` Xamarin.Android.sln ` using your usual mechanism. This will not use the new platform yet,
22
+ but will build the tools like ` param-name-importer ` and ` class-parse ` that will be needed
23
+ in the next steps.
24
+
19
25
### Generate ` params.txt ` File
20
26
21
- - In ` /external/Java.Interop/tools/param-name-importer ` :
22
- - 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 `
23
- - Copy the produced ` api-X.params.txt ` file to ` /src/Mono.Android/Profiles/ `
27
+ Build the ` params.txt ` file for the desired level:
28
+
29
+ - Unstable: ` dotnet-local.cmd build build-tools/create-android-api -t:GenerateParamsFile -p:ParamApiLevel=VanillaIceCream `
30
+ - Stable: ` dotnet-local.cmd build build-tools/create-android-api -t:GenerateParamsFile -p:ParamApiLevel=35 `
31
+
32
+ This will create a ` api-XX.params.txt ` file in ` /src/Mono.Android/Profiles/ ` that needs to be committed.
24
33
25
34
### Generate ` api.xml ` File
26
35
27
36
- Run ` xaprepare android-sdk-platforms=all ` to download all Android SDK platforms
28
37
- Add level to ` /build-tools/api-merge/merge-configuration.xml ` to create ` api-S.xml.class-parse `
29
38
- Run the following command to create a merged ` api.xml ` :
30
- - ` dotnet-local.cmd build build-tools\create-android-api -t:GenerateApiDescription `
31
- - Copy the ` bin\BuildDebug\api\api-xx.xml ` file to ` src\Mono.Android\Profiles `
39
+ - ` dotnet-local.cmd build build-tools/create-android-api -t:GenerateApiDescription `
40
+
41
+ This will create a ` api-XX.xml ` file in ` /src/Mono.Android/Profiles/ ` that needs to be committed.
32
42
33
43
### Other Infrastructure Changes
34
44
0 commit comments