Automatically wire dependencies for native plugins (#8891)
Go through all packages brought in by pub, and write the name and path of every one that is a flutter plugin into .flutter-plugins. In android/settings.gradle and ios/Podfile, read in .flutter-plugins, if that file exists. The Android / iOS code from the plugins is automatically added as dependencies of the native code of the app.
This commit is contained in:
@@ -15,6 +15,7 @@ import '../base/utils.dart';
|
||||
import '../build_info.dart';
|
||||
import '../cache.dart';
|
||||
import '../globals.dart';
|
||||
import '../plugins.dart';
|
||||
import 'android_sdk.dart';
|
||||
import 'android_studio.dart';
|
||||
|
||||
@@ -154,6 +155,8 @@ Future<Null> buildGradleProject(BuildMode buildMode, String target, String kerne
|
||||
settings.values['flutter.buildMode'] = buildModeName;
|
||||
settings.writeContents(localProperties);
|
||||
|
||||
writeFlutterPluginsList();
|
||||
|
||||
final String gradle = ensureGradle();
|
||||
|
||||
switch (flutterPluginVersion) {
|
||||
|
||||
Reference in New Issue
Block a user