Skip to content

Commit bca6f0d

Browse files
authored
Merge branch 'master' into webparagraph_placeholder_boxes
2 parents b1b727d + 8274c72 commit bca6f0d

209 files changed

Lines changed: 13966 additions & 7366 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.ci.yaml‎

Lines changed: 94 additions & 94 deletions
Large diffs are not rendered by default.

‎.github/workflows/quarterly-scheduled-tasks.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
### Checklist
6666
- [ ] Check for the latest `goldctl` git revision (e.g. from [CIPD](https://chrome-infra-packages.appspot.com/p/skia/tools/goldctl) or the [Skia Gold repository](https://skia.googlesource.com/buildbot/+/refs/heads/main/gold-client)).
6767
- [ ] Update `goldctl` in `flutter/flutter`:
68-
- [ ] Update `git_revision` for `goldctl` instances in `.ci.yaml`.
68+
- [ ] Update `git_revision` for `goldctl` instances in `.ci.yaml` and `engine/src/flutter/.ci.yaml`.
6969
- [ ] Validate `.ci.yaml` changes and ensure tests pass.
7070
- [ ] Open PR in `flutter/flutter` to close this issue.
7171
- [ ] Update `goldctl` in `flutter/packages`:

‎DEPS‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ vars = {
1515
'skia_git': 'https://skia.googlesource.com',
1616
'llvm_git': 'https://llvm.googlesource.com',
1717
'dart_ai_rev': '9c96bfe5f091c9451eff5b59c9bffeb2e806b875',
18-
'skia_revision': '17f6986c226c46eb03b4f034ac736ddb1781409c',
18+
'skia_revision': '79a00d7c489848260028fbb787417da3e8d8deaa',
1919

2020
# Do not download the Emscripten SDK by default.
2121
# This prevents us from downloading the Emscripten toolchain for builds
@@ -55,22 +55,22 @@ vars = {
5555
# updated revision list of existing dependencies. You will need to
5656
# gclient sync before and after update deps to ensure all deps are updated.
5757
# updated revision list of existing dependencies.
58-
'dart_revision': '5933cb486b4aef2f8cf6b9f89a5651c0d5b0955e',
58+
'dart_revision': 'b8ffa923309640799d8a3b50a77c2157a7796e09',
5959

6060
# WARNING: DO NOT EDIT MANUALLY
6161
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
6262
'dart_binaryen_rev': '1c0c9f3836e858e01c4f94ac2e5a936d16a6ba1d',
6363
'dart_boringssl_rev': '5e1bfb45c353b2bb36bdf26b006ea8f5566c82d5',
6464
'dart_core_rev': '4d80610a878cdb3f9f10e6a16a2af6631251a3c6',
6565
'dart_devtools_rev': '85f945ac99379d64d4df6f67d9b011e4cc418e7e',
66-
'dart_ecosystem_rev': '16dca7ae5d3ff896a4db47e1ed6cd50f7ebbf115',
67-
'dart_http_rev': '585d433ba315702b63904fddba4459db5fec2d87',
66+
'dart_ecosystem_rev': '622ef61a7edd5de7df38661e163e55c57606c96a',
67+
'dart_http_rev': '23f8574cdfce93c3bb0c6d83d92167d92b9824d5',
6868
'dart_i18n_rev': '1f5ea2fb2381bdf7bab054a43c0d69771f104561',
6969
'dart_perfetto_rev': '13ce0c9e13b0940d2476cd0cff2301708a9a2e2b',
7070
'dart_protobuf_rev': 'a73edc98c98fb25152aa3f12c1b9db91594c1369',
7171
'dart_pub_rev': 'eca8f8ada939be70f0be3189db31e421dd0be7fd',
7272
'dart_sync_http_rev': '6666fff944221891182e1f80bf56569338164d72',
73-
'dart_tools_rev': 'a66d517d18c24faba0ae1b3ae160d47672beb1bb',
73+
'dart_tools_rev': '2b54c71af39b1ec937237b842068fdef5a7c2523',
7474
'dart_vector_math_rev': 'cf3b5db7340d317dd3489e5a35434b408020a852',
7575
'dart_web_rev': '63e6662dc7022a54439d4da6016685c49a0d6018',
7676
'dart_webdriver_rev': '8e5c611ea242efdc9f597a8a37c38a9c586120ee',
@@ -333,10 +333,10 @@ deps = {
333333
Var('dart_git') + '/core.git' + '@' + Var('dart_core_rev'),
334334

335335
'engine/src/flutter/third_party/dart/third_party/pkg/dart_style':
336-
Var('dart_git') + '/dart_style.git@5a9534fad9ff2faba89596a70323d2b1f1bcf163',
336+
Var('dart_git') + '/dart_style.git@76978d23bfb3d225c81ce3f119ab7055a2a57136',
337337

338338
'engine/src/flutter/third_party/dart/third_party/pkg/dartdoc':
339-
Var('dart_git') + '/dartdoc.git@5eb0f2c74eb0e9b8dba3169899aec020a2ad8cb2',
339+
Var('dart_git') + '/dartdoc.git@e1859cfc70702d65476b087b0d577db18c67abfa',
340340

341341
'engine/src/flutter/third_party/dart/third_party/pkg/ecosystem':
342342
Var('dart_git') + '/ecosystem.git' + '@' + Var('dart_ecosystem_rev'),
@@ -351,7 +351,7 @@ deps = {
351351
Var('dart_git') + '/leak_tracker.git@f5620600a5ce1c44f65ddaa02001e200b096e14c',
352352

353353
'engine/src/flutter/third_party/dart/third_party/pkg/native':
354-
Var('dart_git') + '/native.git@a2a617910fe3b2433eaa94bfb491bb3475a71870',
354+
Var('dart_git') + '/native.git@cc7e4b076efadf9705de472bcbed05bf32a87d6a',
355355

356356
'engine/src/flutter/third_party/dart/third_party/pkg/protobuf':
357357
Var('dart_git') + '/protobuf.git' + '@' + Var('dart_protobuf_rev'),
@@ -369,7 +369,7 @@ deps = {
369369
Var('dart_git') + '/external/github.com/simolus3/tar.git@13479f7c2a18f499e840ad470cfcca8c579f6909',
370370

371371
'engine/src/flutter/third_party/dart/third_party/pkg/test':
372-
Var('dart_git') + '/test.git@d749b104edf2cb1428b08782830fc6bd2883e3dc',
372+
Var('dart_git') + '/test.git@30acb69eb30369a1b9ad2adc4a86224393c197ef',
373373

374374
'engine/src/flutter/third_party/dart/third_party/pkg/tools':
375375
Var('dart_git') + '/tools.git' + '@' + Var('dart_tools_rev'),

‎TESTOWNERS‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## Linux Android DeviceLab tests
1212
/dev/devicelab/bin/tasks/analyzer_benchmark.dart @bkonyi @flutter/tool
13-
/dev/devicelab/bin/tasks/android_choreographer_do_frame_test.dart @reidbaker @flutter/engine
13+
/dev/devicelab/bin/tasks/android_choreographer_do_frame_test.dart @jesswrd @flutter/engine
1414
/dev/devicelab/bin/tasks/android_defines_test.dart @jesswrd @flutter/android
1515
/dev/devicelab/bin/tasks/android_engine_flags_debug_test.dart @camsim99 @flutter/android
1616
/dev/devicelab/bin/tasks/android_engine_flags_release_test.dart @camsim99 @flutter/android
@@ -19,7 +19,7 @@
1919
/dev/devicelab/bin/tasks/android_java11_dependency_smoke_tests.dart @jesswrd @flutter/android
2020
/dev/devicelab/bin/tasks/android_java17_build_android_host_app_with_module_aar.dart @jesswrd @flutter/android
2121
/dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart @jesswrd @flutter/android
22-
/dev/devicelab/bin/tasks/android_lifecycles_test.dart @reidbaker @flutter/engine
22+
/dev/devicelab/bin/tasks/android_lifecycles_test.dart @gmackall @flutter/engine
2323
/dev/devicelab/bin/tasks/android_picture_cache_complexity_scoring_perf__timeline_summary.dart @flar @flutter/engine
2424
/dev/devicelab/bin/tasks/android_stack_size_test.dart @bkonyi @flutter/tool
2525
/dev/devicelab/bin/tasks/android_verified_input_test.dart @gmackall @flutter/android
@@ -242,7 +242,7 @@
242242
/dev/devicelab/bin/tasks/very_long_picture_scrolling_perf_ios__e2e_summary.dart @flar @flutter/engine
243243

244244
## Host only DeviceLab tests
245-
/dev/devicelab/bin/tasks/android_display_cutout.dart @reidbaker @flutter/android
245+
/dev/devicelab/bin/tasks/android_display_cutout.dart @mboetger @flutter/android
246246
/dev/devicelab/bin/tasks/android_release_builds_exclude_dev_dependencies_test.dart @camsim99 @flutter/android
247247
/dev/devicelab/bin/tasks/animated_complex_opacity_perf_macos__e2e_summary.dart @loic-sharma @flutter/desktop
248248
/dev/devicelab/bin/tasks/basic_material_app_macos__compile.dart @loic-sharma @flutter/desktop
@@ -362,15 +362,15 @@
362362
/dev/integration_tests/deferred_components_test @mboetger @flutter/android
363363

364364
## Firebase tests
365-
/dev/integration_tests/release_smoke_test @reidbaker @flutter/android
365+
/dev/integration_tests/release_smoke_test @jesswrd @flutter/android
366366

367367
## Shards tests
368368
# TODO(keyonghan): add files/paths for below framework host only testss.
369369
# https://github.com/flutter/flutter/issues/82068
370370
#
371371
# analyze @justinmc @flutter/framework
372-
# android_engine_opengles_tests @reidbaker @flutter/android
373-
# android_engine_vulkan_tests @reidbaker @flutter/android
372+
# android_engine_opengles_tests @gmackall @flutter/android
373+
# android_engine_vulkan_tests @mboetger @flutter/android
374374
# android_engine_hcpp_tests @gmackall @flutter/android
375375
# android_hardware_smoke_opengles_tests @andywolff @flutter/engine
376376
# android_hardware_smoke_vulkan_tests @andywolff @flutter/engine
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d8d9e97d2d02bf785084e7dc9409a79a49e75967
1+
a1ed23c8f76035baa4edb2003d50349d07e7d6e0

‎dev/devicelab/bin/tasks/module_host_with_custom_build_test.dart‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,57 @@ Future<void> main() async {
271271
'lib/armeabi-v7a/libflutter.so',
272272
], await getFilesInApk(demoProdApk));
273273

274+
await clean();
275+
276+
section('Run app:assembleDemoQa with android.newDsl=true');
277+
278+
// The fixture's gradle.properties sets android.newDsl=false. With
279+
// android.newDsl=true, AGP has no `libraryVariants` or `applicationVariants`.
280+
final String demoQaOutput = await inDirectory(hostAppDir, () async {
281+
return eval(
282+
gradlewExecutable,
283+
<String>[
284+
'app:assembleDemoQa',
285+
'-Pandroid.newDsl=true',
286+
'-Pflutter.hostAppProjectName=app',
287+
],
288+
environment: <String, String>{'JAVA_HOME': javaHome},
289+
);
290+
});
291+
292+
if (!demoQaOutput.contains(
293+
"The Gradle property 'flutter.hostAppProjectName' has no effect.",
294+
)) {
295+
return TaskResult.failure(
296+
'Expected a warning that flutter.hostAppProjectName has no effect',
297+
);
298+
}
299+
300+
final String demoQaApk = path.join(
301+
hostAppDir.path,
302+
'app',
303+
'build',
304+
'outputs',
305+
'apk',
306+
'demo',
307+
'qa',
308+
'app-demo-qa.apk',
309+
);
310+
311+
if (!exists(File(demoQaApk))) {
312+
return TaskResult.failure('Failed to build app-demo-qa.apk');
313+
}
314+
315+
section('Verify AOT ELF in app-demo-qa.apk');
316+
317+
final Iterable<String> demoQaFiles = await getFilesInApk(demoQaApk);
318+
checkCollectionContains<String>(<String>[
319+
...flutterAssets,
320+
'lib/arm64-v8a/libapp.so',
321+
'lib/armeabi-v7a/libapp.so',
322+
], demoQaFiles);
323+
checkCollectionDoesNotContain<String>(debugAssets, demoQaFiles);
324+
274325
return TaskResult.success(null);
275326
} on TaskResult catch (taskResult) {
276327
return taskResult;

‎dev/integration_tests/module_host_with_custom_build_v2_embedding/app/build.gradle‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ android {
3434
initWith release
3535
matchingFallbacks += 'release'
3636
}
37+
// Debuggable, but consumes the module's release variant, so it gets release Flutter
38+
// artifacts.
39+
qa {
40+
initWith debug
41+
matchingFallbacks += 'release'
42+
}
3743
}
3844
// Test flavors.
3945
flavorDimensions += "version"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
3-
flutter.hostAppProjectName=SampleApp
43
android.newDsl=false

‎docs/platforms/android/Migrating-Flutter-Gradle-Plugin-to-AGP-public-API.md‎

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ projects. That opt-out dies with AGP 10.
9999
5. **`buildModeFor` semantics.** Every variant-scope call uses the
100100
`(name, debuggable)` overload with the public `Component.debuggable`.
101101
Name-based inference is confined to the one DSL-scope case with no public
102-
signal (the library-plugin build-type copy in `PluginHandler`). This
103-
preserves add-to-app custom-debuggable matching (a host `staging`
104-
debuggable build type maps to debug engine artifacts).
102+
signal (the library-plugin build-type copy in `PluginHandler`). In an
103+
add-to-app module the call reads the module's own variant, so the build mode
104+
follows the module variant that the host's `matchingFallbacks` select (see
105+
"Features that must break" item 6).
105106
6. **P3 pre-spike / PR 4 (afterEvaluate DSL mutation under newDsl).** The planned scratch-app
106107
spike (AGP 9.1 + `newDsl=true` + custom build type, verifying that build-type
107108
creation from `pluginProject.afterEvaluate` still works) could not run in the
@@ -237,12 +238,23 @@ else serializes through `FlutterPlugin.kt` / `FlutterPluginUtils.kt`.
237238
but C++ debugging will be broken for those custom build types.
238239
5. **Asset merge**: flutter assets become a merged source dir instead of a
239240
post-merge overwrite; collisions resolve by AGP source-set priority.
240-
6. **Add-to-app**: the explicit `:app:merge<V>Assets.dependsOn` edge and
241-
host-project lookup are removed; `flutter.hostAppProjectName` becomes a
242-
no-op with a deprecation warning naming a removal milestone. Build scripts that
243-
reference Flutter's `copyFlutterAssets<V>` tasks by name (e.g. `tasks.getByPath(...)`)
244-
will crash with a `Task with path ... not found` error because the tasks are now
245-
registered lazily.
241+
6. **Add-to-app**: the module registers its Flutter tasks in its own `onVariants` and
242+
adds the staged assets and native libraries as generated source directories of each
243+
library variant. The host consumes them like any Android library's, so the
244+
host-project lookup, the `libraryVariants` × host `applicationVariants` loop and the
245+
`:app:merge<V>Assets.dependsOn` edge are removed.
246+
- `flutter.hostAppProjectName` has no effect; setting it logs a warning that names no
247+
removal milestone.
248+
- Every module variant is configured whatever the command line names, because the
249+
host's `matchingFallbacks`, not the task name, decide which module variant a host
250+
task consumes. Registration is lazy, so only that variant runs. Cost: a host build
251+
of only `assemble<Variant>AndroidTest` runs the module's `flutter assemble`.
252+
- The build mode comes from the consumed module variant, not the host build type. A
253+
debuggable host build type that falls back to the module's `release` gets release
254+
artifacts. Built as the only task, the deleted code ran the module's debug Flutter
255+
build for it, and the APK had no `flutter_assets` and no `libapp.so`.
256+
- Module assets are a generated source directory (item 5), and `copyFlutterAssets<V>`
257+
is a `CopyFlutterAssetsTask` (item 7).
246258
7. **Task realization/type**: flutter tasks become lazy `TaskProvider`s, and
247259
`copyFlutterAssets<V>` changes type from `org.gradle.api.tasks.Copy` to a
248260
custom task class — `tasks.named(..., Copy::class)` casts fail.

‎docs/platforms/android/website-page-draft.md‎

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -194,28 +194,27 @@ aliases:
194194

195195
### Add-to-app (Flutter module in a host app)
196196

197-
- Flutter no longer looks up or configures the host `:app` project from the
198-
module. The dependency between your host's asset merging and Flutter's asset
199-
copy is expressed through the Variant API instead of an explicit
200-
`merge<Variant>Assets.dependsOn(...)` edge. Build scripts that reference
201-
Flutter's `copyFlutterAssets<Variant>` tasks by name or type will break.
202-
For example, `tasks.getByPath(":flutter:copyFlutterAssetsDebug")` will crash
203-
your build with a `Task with path ... not found` error because the
204-
tasks are now registered lazily and are no longer of type
205-
`org.gradle.api.tasks.Copy`.
206-
- `flutter.hostAppProjectName` in `gradle.properties` is now a no-op. Flutter
207-
prints a deprecation warning naming the removal milestone. It was only used
208-
for the host-project lookup, which no longer exists.
209-
- Flutter maps host build types to Flutter build modes using the public
210-
"debuggable" flag: `profile` stays `profile`, debuggable build types map to
211-
`debug`, everything else maps to `release`. If your host has no `profile`
212-
build type, add `matchingFallbacks`:
197+
- The Flutter module adds its assets and native libraries to its own variants
198+
through the Variant API. Your host app consumes them like the assets of any
199+
Android library. Flutter does not look up or configure the host `:app`
200+
project, and adds no `merge<Variant>Assets.dependsOn(...)` edge to it.
201+
- `flutter.hostAppProjectName` in `gradle.properties` has no effect. If it is
202+
set, Flutter prints a warning that says so. You can remove it.
203+
- The Flutter module's `copyFlutterAssets<Variant>` tasks are of type
204+
`CopyFlutterAssetsTask`, not `org.gradle.api.tasks.Copy`. Build scripts that
205+
look them up with the `Copy` type fail.
206+
- The Flutter build mode comes from the module variant your host build
207+
consumes: the module's `debug` variant builds debug Flutter artifacts,
208+
`profile` builds profile, and `release` builds release. Host `debug`,
209+
`profile` and `release` build types consume the module variant of the same
210+
name. For a custom host build type, AGP picks the module variant through the
211+
build type's `matchingFallbacks`, so list the module build type you want
212+
first:
213213

214214
```kotlin
215215
create("staging") {
216216
initWith(getByName("debug"))
217-
isDebuggable = true // staging gets debug Flutter artifacts
218-
matchingFallbacks += listOf("debug", "release")
217+
matchingFallbacks += listOf("debug", "release") // staging gets debug Flutter artifacts
219218
}
220219
```
221220

0 commit comments

Comments
 (0)