flutter/dev/tracing_tests
Gray Mackall b98d48549c
Make flutter tool enforce >= kotlin 1.7.0, Gradle 7.0.2, and AGP 7.0.0, and Fix test failures blocking androidx upgrade (#149204)
PR to pave the way for https://github.com/flutter/engine/pull/53001 to re-land

Summary: 
- Enforces use of Kotlin >= `1.7.0` (please see below note)
- Fixes ci failures that prevented the above PR from landing.

Details:

Because it landed initially, we are able to fake the roll in this PR to fix all the tests ([see my comment](https://github.com/flutter/flutter/pull/149204#discussion_r1617924772)).

Fixes all the tests that failed:
1. `module_test` failing on multiple platforms (3/9 of the failures). 
Failure is 
```
> Android resource linking failed
   ERROR:/b/s/w/ir/x/t/flutter_module_test.KECMXW/hello/.android/plugins_build_output/device_info/intermediates/merged_res/release/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.
```

This is a rather unhelpful error message but some [folks online suggest](https://stackoverflow.com/a/69050529) that upgrading your `compileSdk` version fixes this.
These resolve when I remove the dependency on the long discontinued [package_info](https://pub.dev/packages/package_info) and [device_info](https://pub.dev/packages/device_info) packages, perhaps because they are transitively pulling in low `compileSdk` versions? This is unclear to me.

2. `module_custom_host_app_name_test` was failing for the same reason (another 3/9, or cumulative 6/9).
3. `tool_integration_tests_3_4` was a flake 🙂 (7/9)
4. `framework_tests_slow` needed a newer version of the Kotlin Gradle plugin (the flutter tool tells us this, so I just upgraded as suggested) and it resolved (8/9)
5.`android_preview_tool_integration_tests` needed newer AGP and KGP versions. I also refactored the tests, and bumped our error versions, fixing https://github.com/flutter/flutter/issues/142653.

**Note that the bump to KGP is not in line with our policy** - we didn't warn for `1.5.0-1.6.x` for a release (or at all) before dropping support. But I think it might still be justified:
- The bump to our androidx libraries unblocks ongoing Scribe work, and also includes a fix for a [memory leak](https://github.com/flutter/flutter/issues/129307#issuecomment-1601636959) and a [crash on folding phones](https://github.com/flutter/flutter/issues/114868#issuecomment-2133226962), among many other bug fixes.
- Gradle [doesn't test on half of that range](https://docs.gradle.org/current/userguide/compatibility.html#kotlin), and so we implicitly can't claim to support it either. More generally, our Java and Kotlin support ranges should probably strictly fall within what Gradle tests.
2024-06-18 20:24:09 +00:00
..
android Make flutter tool enforce >= kotlin 1.7.0, Gradle 7.0.2, and AGP 7.0.0, and Fix test failures blocking androidx upgrade (#149204) 2024-06-18 20:24:09 +00:00
lib Prepare dev (minus flutter_gallery) for use_super_parameters (#100516) 2022-03-29 12:52:42 -07:00
test Manual roll Flutter Engine from 4f4734cd48da to a0d650e37f5d (3 revisions) (#131967) 2023-08-05 01:22:17 +00:00
pubspec.yaml Roll pub packages (#150267) 2024-06-14 18:19:41 +00:00
README.md Improve tracing (#93086) 2021-12-10 10:09:24 -08:00

Tracing tests

"Application"

The lib/test.dart and lib/control.dart files in this directory are used by dev/bots/test.dart's runTracingTests function to check whether aspects of the tracing logic in the framework get compiled out in profile and release builds. They're not meant to be run directly.

The strings in these files are used in dev/bots/test.dart.

Tests

The tests in this folder must be run with flutter test --enable-vmservice, since they test that trace data is written to the timeline by connecting to the observatory.

These tests will fail if run without this flag.