-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
In #160289, I attempt to enable flutter config --explicit-package-dependencies.
It's getting there... the next blocker after updating the lock files is this:
$ cd dev/integration_tests/spell_check
$ flutter config --explicit-package-dependencies
$ flutter build apk
e: file:///Users/matanl/Developer/flutter/dev/integration_tests/spell_check/android/app/src/main/kotlin/com/example/sc_int_test/MainActivity.kt:3:8 Unresolved reference: io
e: file:///Users/matanl/Developer/flutter/dev/integration_tests/spell_check/android/app/src/main/kotlin/com/example/sc_int_test/MainActivity.kt:5:22 Unresolved reference: FlutterActivity
FAILURE: Build failed with an exception.From what I can tell, it's due to this stanza in flutter.groovy:
flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
Lines 600 to 603 in 90f926e
| if (!isFlutterAppProject() || getPluginList(project).size() == 0) { | |
| addApiDependencies(project, buildType.name, | |
| "io.flutter:flutter_embedding_$flutterBuildMode:$engineVersion") | |
| } |
With our new logic flow (TM), it's possible for plugins to evaluate to size() > 0 and no plugins to receive the Flutter embedding dependencies. From talking to @gmackall this may or may not be intentional, we can figure that out debugging and submitting PRs fixing these tests.
What I'd like to see is:
android_release_builds_exclude_dev_dependencies_testshowcases the failure being talked about (and is fixed)- The above workflow (
cd dev/integration_tests/spell_check && flutter build apk) works when the flag is enabled
flutter/dev/devicelab/bin/tasks/android_release_builds_exclude_dev_dependencies_test.dart
Lines 32 to 36 in 90f926e
| // Add devDependencyPlugin as dependency of flutterProject. | |
| await flutterProject.addPlugin( | |
| 'dev_dependency_plugin', | |
| options: <String>['--path', path.join(tempDir.path, 'dev_dependency_plugin')], | |
| ); |