flutter_flutter/dev/integration_tests
flutteractionsbot 31c0ff4763
[CP-beta]Support host android apps with kts gradle files for add to app (#157881)
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

This allows host Android apps using Kotlin Gradle files to depend on a Flutter module as source, see
https://docs.flutter.dev/add-to-app/android/project-setup#add-the-flutter-module-as-a-dependency. 

Previously they wouldn't be able to, because we expected the host app to use `setBinding` in it's Gradle files, which is Groovy syntax that doesn't have a parallel in the Kotlin Gradle DSL. They could still depend on a flutter module if built as an aar.

### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples

Allows host Android apps using Kotlin Gradle files to include a Flutter module.

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)

Without this change, Android apps using Kotlin Gradle files are unable to depend on a Flutter module as source (they would still be able to as an aar).

### Workaround:
Is there a workaround for this issue?

Build the flutter module as an aar.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Create a new Android app (probably in Android studio).
Create a Flutter module (`flutter create foobar --template=module`).
Apply [this diff](1f1e92ac79), matching names to your specific case, to the Android app.
2024-11-05 19:56:37 +00:00
..
2024-10-01 22:45:08 +00:00
2024-10-01 22:45:08 +00:00
2024-09-25 00:03:57 +00:00

Automated Flutter integration test suites

Each suite consists of either a complete Flutter app and a flutter_driver specification that drives tests from the UI, or a native app that is meant to integrate with Flutter for testing.

Intended for use with devicelab tests.

If you want to run a driver test locally, to debug a problem with a test, you can use this command from the appropriate subdirectory:

flutter drive -t <test> --driver <driver>

For example:

flutter drive -t lib/keyboard_resize.dart --driver test_driver/keyboard_resize_test.dart