Repository: flutter
Issue: Module type projects can't be built when there are plugins with a local engine
Labels: team,c: crash,platform-android,tool,t: gradle,a: existing-apps,P3,team-android,triaged-android

```
flutter create normal_project
[add some plugin to pubspec]
flutter run --local-engine
```

works

```
flutter create -t module module_project
[add some plugin to pubspec]
flutter run --local-engine
```

however causes 

```
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:profileCompileClasspath'.
   > Could not resolve project :url_launcher.
     Required by:
         project :app > project :flutter
      > No matching variant of project :url_launcher was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile' but:
          - Variant 'debugApiElements' capability io.flutter.plugins.urllauncher:url_launcher:1.0-SNAPSHOT declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
          - Variant 'debugRuntimeElements' capability io.flutter.plugins.urllauncher:url_launcher:1.0-SNAPSHOT declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
          - Variant 'releaseApiElements' capability io.flutter.plugins.urllauncher:url_launcher:1.0-SNAPSHOT declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
          - Variant 'releaseRuntimeElements' capability io.flutter.plugins.urllauncher:url_launcher:1.0-SNAPSHOT declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
   > Could not resolve project :sensors.
     Required by:
         project :app > project :flutter
      > No matching variant of project :sensors was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile' but:
          - Variant 'debugApiElements' capability io.flutter.plugins.sensors:sensors:1.0-SNAPSHOT declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
          - Variant 'debugRuntimeElements' capability io.flutter.plugins.sensors:sensors:1.0-SNAPSHOT declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
          - Variant 'releaseApiElements' capability io.flutter.plugins.sensors:sensors:1.0-SNAPSHOT declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
          - Variant 'releaseRuntimeElements' capability io.flutter.plugins.sensors:sensors:1.0-SNAPSHOT declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
```