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:
Jakob Andersen
2017-03-23 14:59:12 +01:00
committed by GitHub
parent 2d29c62590
commit b61e169011
7 changed files with 146 additions and 11 deletions

View File

@@ -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) {