Misc docs cleanup and fixes (#155501)
This commit is contained in:
@@ -1,27 +1,34 @@
|
||||
# Support a new Android API level Flutter (go/flutter-android-new-api-level)
|
||||
|
||||
## Objective
|
||||
|
||||
Provides a list of areas to consider and examples of former work for how to update Flutter to support a new version of the Android API. This happens every fall and Flutter developers expect to build against the latest versions quickly after they are available.
|
||||
|
||||
### Overview
|
||||
|
||||
#### Bump compile and target SDK versions in samples
|
||||
|
||||
Samples, especially add to app samples, represent apps that mirror the first types of users we see adopt new Android APIs.
|
||||
|
||||
Example PR: https://github.com/flutter/samples/pull/2368
|
||||
|
||||
#### New Android features
|
||||
|
||||
New Android features can require a broad spectrum of work. Some will require nothing from flutter. Some will require a lot of work, such as the support for “back preview”. The Android team generally needs to be aware and schedule work ahead of time.
|
||||
|
||||
#### Update Gradle/AGP support
|
||||
Sometimes newer versions of gradle are required to build without warning against a new version of Android API. The warning looks like
|
||||
|
||||
Sometimes newer versions of gradle are required to build without warning against a new version of Android API. The warning looks like:
|
||||
|
||||
```
|
||||
WARNING:We recommend using a newer Android Gradle plugin to use compileSdkPreview = "somenamedversion"
|
||||
This Android Gradle plugin (X.X.X) was tested up to compileSdk = XX
|
||||
```
|
||||
|
||||
Bump the gradle version used in the engine.
|
||||
|
||||
#### Update Robolectric
|
||||
|
||||
Robolectric is a dependency that allows us to write unit tests that run on a local development machine against the Android API surface without being on an Android device.
|
||||
Update what version of Robolectric we use in framework, engine and packages.
|
||||
|
||||
@@ -64,10 +71,12 @@ Specifically the value for “--device” `./script/tool_runner.sh firebase-test
|
||||
Example PR: https://github.com/flutter/packages/pull/4430
|
||||
|
||||
#### Update documentation
|
||||
|
||||
Update documentation page to indicate the new API is tested
|
||||
https://docs.flutter.dev/reference/supported-platforms.
|
||||
|
||||
#### Modify defaults
|
||||
|
||||
**In flutter/flutter:** Update default compile SDK version and target SDK version to the new API value.
|
||||
[Code here](../../../packages/flutter_tools/gradle/src/main/groovy/flutter.groovy).
|
||||
Follow comments in that file to update other locations that are assumed to be the same.
|
||||
@@ -90,11 +99,15 @@ https://github.com/flutter/engine/blob/9289cb6a36aa86990e3ffe0f20324dafa38e7c11/
|
||||
**In flutter/packages:** Set examples to build with the new API.
|
||||
|
||||
#### Test “Integration Test” package
|
||||
|
||||
Integration test is a package shipped in the Flutter tool for running integration tests on Flutter apps. Ensure that the integration test package has an example that targets the new API level on the most recent published stable version of the Flutter tool.
|
||||
|
||||
#### Related documents
|
||||
|
||||
[Emulators for Flutter Android Testing (PUBLICLY SHARED)](https://docs.google.com/document/d/10wYUcLcSTF4Epg2EUGoBqOkkOe4zxKHvYKjXFZAOgGs/edit?resourcekey=0-pltjPvEtVezXDADMbUwFHQ)
|
||||
|
||||
### Additional notes
|
||||
|
||||
#### Upload new SDK version to CIPD and consume in buildroot
|
||||
|
||||
See [Upgrading Engine's Android API version](https://github.com/flutter/flutter/blob/main/docs/platforms/android/Upgrading-Engine's-Android-API-version.md) for instructions, as this work is also required to build the engine against the new Android version.
|
||||
|
||||
Reference in New Issue
Block a user