diff --git a/.gitignore b/.gitignore
index ccb0eeb34605..734169649fd3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@ Pods/
ServiceDefinitions.json
xcuserdata/
*.xcworkspace
+**/DerivedData/
local.properties
keystore.properties
diff --git a/.opensource/project.json b/.opensource/project.json
index 19da74a6cafd..b00f3a46f6ea 100644
--- a/.opensource/project.json
+++ b/.opensource/project.json
@@ -1,24 +1,11 @@
{
- "name": "FlutterFire",
+ "name": "FlutterFire - MOVED",
"platforms": [
"Android",
"iOS"
],
"content": "FlutterFire.md",
- "pages": {
- "packages/cloud_firestore/README.md": "Cloud Firestore",
- "packages/cloud_functions/README.md": "Cloud Functions",
- "packages/firebase_admob/README.md": "Admob",
- "packages/firebase_analytics/README.md": "Analytics",
- "packages/firebase_auth/README.md": "Authentication",
- "packages/firebase_core/README.md": "Core",
- "packages/firebase_crashlytics/README.md": "Crashlytics",
- "packages/firebase_database/README.md": "Realtime Database",
- "packages/firebase_dynamic_links/README.md": "Dynamic Links",
- "packages/firebase_messaging/README.md": "Cloud Messaging",
- "packages/firebase_ml_vision/README.md": "ML Kit: Vision",
- "packages/firebase_performance/README.md": "Performance Monitoring",
- "packages/firebase_remote_config/README.md": "Remote Config",
- "packages/firebase_storage/README.md": "Cloud Storage"
- }
+ "related": [
+ "FirebaseExtended/flutterfire"
+ ]
}
diff --git a/FlutterFire.md b/FlutterFire.md
new file mode 100644
index 000000000000..00326167e7ab
--- /dev/null
+++ b/FlutterFire.md
@@ -0,0 +1,6 @@
+# FlutterFire - MOVED
+
+The FlutterFire family of plugins has moved to the FirebaseExtended organization on GitHub. This makes it easier for us to collaborate with the Firebase team. We want to build the best integration we can!
+
+Visit FlutterFire at its new home:
+https://github.com/FirebaseExtended/flutterfire
\ No newline at end of file
diff --git a/examples/all_plugins/android/gradle.properties b/examples/all_plugins/android/gradle.properties
deleted file mode 100644
index bb0411185aea..000000000000
--- a/examples/all_plugins/android/gradle.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-android.enableJetifier=true
-android.useAndroidX=true
-org.gradle.jvmargs=-Xmx1536M
-
diff --git a/examples/all_plugins/ios/Flutter/Debug.xcconfig b/examples/all_plugins/ios/Flutter/Debug.xcconfig
deleted file mode 100644
index 592ceee85b89..000000000000
--- a/examples/all_plugins/ios/Flutter/Debug.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "Generated.xcconfig"
diff --git a/examples/all_plugins/ios/Flutter/Release.xcconfig b/examples/all_plugins/ios/Flutter/Release.xcconfig
deleted file mode 100644
index 592ceee85b89..000000000000
--- a/examples/all_plugins/ios/Flutter/Release.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "Generated.xcconfig"
diff --git a/examples/all_plugins/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/all_plugins/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 1d526a16ed0f..000000000000
--- a/examples/all_plugins/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/examples/all_plugins/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/all_plugins/ios/Runner.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 1d526a16ed0f..000000000000
--- a/examples/all_plugins/ios/Runner.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
deleted file mode 100644
index 3d43d11e66f4..000000000000
Binary files a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ
diff --git a/examples/all_plugins/lib/main.dart b/examples/all_plugins/lib/main.dart
deleted file mode 100644
index f4ebf1dd00e1..000000000000
--- a/examples/all_plugins/lib/main.dart
+++ /dev/null
@@ -1,111 +0,0 @@
-import 'package:flutter/material.dart';
-
-void main() => runApp(MyApp());
-
-class MyApp extends StatelessWidget {
- // This widget is the root of your application.
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- title: 'Flutter Demo',
- theme: ThemeData(
- // This is the theme of your application.
- //
- // Try running your application with "flutter run". You'll see the
- // application has a blue toolbar. Then, without quitting the app, try
- // changing the primarySwatch below to Colors.green and then invoke
- // "hot reload" (press "r" in the console where you ran "flutter run",
- // or simply save your changes to "hot reload" in a Flutter IDE).
- // Notice that the counter didn't reset back to zero; the application
- // is not restarted.
- primarySwatch: Colors.blue,
- ),
- home: MyHomePage(title: 'Flutter Demo Home Page'),
- );
- }
-}
-
-class MyHomePage extends StatefulWidget {
- MyHomePage({Key key, this.title}) : super(key: key);
-
- // This widget is the home page of your application. It is stateful, meaning
- // that it has a State object (defined below) that contains fields that affect
- // how it looks.
-
- // This class is the configuration for the state. It holds the values (in this
- // case the title) provided by the parent (in this case the App widget) and
- // used by the build method of the State. Fields in a Widget subclass are
- // always marked "final".
-
- final String title;
-
- @override
- _MyHomePageState createState() => _MyHomePageState();
-}
-
-class _MyHomePageState extends State {
- int _counter = 0;
-
- void _incrementCounter() {
- setState(() {
- // This call to setState tells the Flutter framework that something has
- // changed in this State, which causes it to rerun the build method below
- // so that the display can reflect the updated values. If we changed
- // _counter without calling setState(), then the build method would not be
- // called again, and so nothing would appear to happen.
- _counter++;
- });
- }
-
- @override
- Widget build(BuildContext context) {
- // This method is rerun every time setState is called, for instance as done
- // by the _incrementCounter method above.
- //
- // The Flutter framework has been optimized to make rerunning build methods
- // fast, so that you can just rebuild anything that needs updating rather
- // than having to individually change instances of widgets.
- return Scaffold(
- appBar: AppBar(
- // Here we take the value from the MyHomePage object that was created by
- // the App.build method, and use it to set our appbar title.
- title: Text(widget.title),
- ),
- body: Center(
- // Center is a layout widget. It takes a single child and positions it
- // in the middle of the parent.
- child: Column(
- // Column is also layout widget. It takes a list of children and
- // arranges them vertically. By default, it sizes itself to fit its
- // children horizontally, and tries to be as tall as its parent.
- //
- // Invoke "debug painting" (press "p" in the console, choose the
- // "Toggle Debug Paint" action from the Flutter Inspector in Android
- // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
- // to see the wireframe for each widget.
- //
- // Column has various properties to control how it sizes itself and
- // how it positions its children. Here we use mainAxisAlignment to
- // center the children vertically; the main axis here is the vertical
- // axis because Columns are vertical (the cross axis would be
- // horizontal).
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Text(
- 'You have pushed the button this many times:',
- ),
- Text(
- '$_counter',
- style: Theme.of(context).textTheme.display1,
- ),
- ],
- ),
- ),
- floatingActionButton: FloatingActionButton(
- onPressed: _incrementCounter,
- tooltip: 'Increment',
- child: Icon(Icons.add),
- ), // This trailing comma makes auto-formatting nicer for build methods.
- );
- }
-}
diff --git a/examples/all_plugins/pubspec.yaml b/examples/all_plugins/pubspec.yaml
deleted file mode 100644
index 75fa414088ac..000000000000
--- a/examples/all_plugins/pubspec.yaml
+++ /dev/null
@@ -1 +0,0 @@
-### Generated file. Run `pub global run flutter_plugin_tools gen-pubspec`.
diff --git a/packages/android_intent/CHANGELOG.md b/packages/android_intent/CHANGELOG.md
index 7a818f38548a..82b4774ee29d 100644
--- a/packages/android_intent/CHANGELOG.md
+++ b/packages/android_intent/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.3.3+1
+
+* Added "action_application_details_settings" action to open application info settings .
+
## 0.3.3
* Added "flags" option to call intent.addFlags(int) in native.
diff --git a/packages/android_intent/README.md b/packages/android_intent/README.md
index 5a9243e6914b..a6e4a4206a6e 100644
--- a/packages/android_intent/README.md
+++ b/packages/android_intent/README.md
@@ -29,6 +29,19 @@ for it in the plugin and use an action constant to refer to it. For instance:
`'action_location_source_settings'` translates to `android.settings.LOCATION_SOURCE_SETTINGS`
+`'action_application_details_settings'` translates to `android.settings.ACTION_APPLICATION_DETAILS_SETTINGS`
+
+```dart
+if (platform.isAndroid) {
+ final AndroidIntent intent = AndroidIntent(
+ action: 'action_application_details_settings',
+ data: 'package:com.example.app', // replace com.example.app with your applicationId
+ );
+ await intent.launch();
+}
+
+```
+
Feel free to add support for additional Android intents.
The Dart values supported for the arguments parameter, and their corresponding
diff --git a/packages/android_intent/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java b/packages/android_intent/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java
index a66116cdceeb..b6d3c81b1a8c 100644
--- a/packages/android_intent/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java
+++ b/packages/android_intent/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java
@@ -46,6 +46,8 @@ private String convertAction(String action) {
return Settings.ACTION_SETTINGS;
case "action_location_source_settings":
return Settings.ACTION_LOCATION_SOURCE_SETTINGS;
+ case "action_application_details_settings":
+ return Settings.ACTION_APPLICATION_DETAILS_SETTINGS;
default:
return action;
}
diff --git a/packages/android_intent/example/lib/main.dart b/packages/android_intent/example/lib/main.dart
index becf3d6e1e75..f56cffd2bd20 100644
--- a/packages/android_intent/example/lib/main.dart
+++ b/packages/android_intent/example/lib/main.dart
@@ -142,6 +142,14 @@ class ExplicitIntentsWidget extends StatelessWidget {
intent.launch();
}
+ void _openApplicationDetails() {
+ final AndroidIntent intent = const AndroidIntent(
+ action: 'action_application_details_settings',
+ data: 'package:io.flutter.plugins.androidintentexample',
+ );
+ intent.launch();
+ }
+
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -186,6 +194,12 @@ class ExplicitIntentsWidget extends StatelessWidget {
'Tap here to open Location Settings Configuration',
),
onPressed: _openLocationSettingsConfiguration,
+ ),
+ RaisedButton(
+ child: const Text(
+ 'Tap here to open Application Details',
+ ),
+ onPressed: _openApplicationDetails,
)
],
),
diff --git a/packages/android_intent/pubspec.yaml b/packages/android_intent/pubspec.yaml
index 11cbc319bbf0..3da7690f2c0d 100644
--- a/packages/android_intent/pubspec.yaml
+++ b/packages/android_intent/pubspec.yaml
@@ -2,7 +2,7 @@ name: android_intent
description: Flutter plugin for launching Android Intents. Not supported on iOS.
author: Flutter Team
homepage: https://github.com/flutter/plugins/tree/master/packages/android_intent
-version: 0.3.3
+version: 0.3.3+1
flutter:
plugin:
diff --git a/packages/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/CHANGELOG.md
index c88a00be904a..addc8831efe3 100644
--- a/packages/google_maps_flutter/CHANGELOG.md
+++ b/packages/google_maps_flutter/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.5.21+1
+
+* Fix `prefer_const_constructors` analyzer warnings in example app.
+
## 0.5.21
* Don't recreate map elements if they didn't change since last widget build.
diff --git a/packages/google_maps_flutter/example/lib/padding.dart b/packages/google_maps_flutter/example/lib/padding.dart
index be45cb38d0c1..599f8a564b6e 100644
--- a/packages/google_maps_flutter/example/lib/padding.dart
+++ b/packages/google_maps_flutter/example/lib/padding.dart
@@ -93,7 +93,7 @@ class MarkerIconsBodyState extends State {
controller: _topController,
keyboardType: TextInputType.number,
textAlign: TextAlign.center,
- decoration: InputDecoration(
+ decoration: const InputDecoration(
hintText: "Top",
),
),
@@ -105,7 +105,7 @@ class MarkerIconsBodyState extends State {
controller: _bottomController,
keyboardType: TextInputType.number,
textAlign: TextAlign.center,
- decoration: InputDecoration(
+ decoration: const InputDecoration(
hintText: "Bottom",
),
),
@@ -117,7 +117,7 @@ class MarkerIconsBodyState extends State {
controller: _leftController,
keyboardType: TextInputType.number,
textAlign: TextAlign.center,
- decoration: InputDecoration(
+ decoration: const InputDecoration(
hintText: "Left",
),
),
@@ -129,7 +129,7 @@ class MarkerIconsBodyState extends State {
controller: _rightController,
keyboardType: TextInputType.number,
textAlign: TextAlign.center,
- decoration: InputDecoration(
+ decoration: const InputDecoration(
hintText: "Right",
),
),
diff --git a/packages/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/pubspec.yaml
index f8a852998d42..a72cb71fdd78 100644
--- a/packages/google_maps_flutter/pubspec.yaml
+++ b/packages/google_maps_flutter/pubspec.yaml
@@ -2,7 +2,7 @@ name: google_maps_flutter
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
author: Flutter Team
homepage: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter
-version: 0.5.21
+version: 0.5.21+1
dependencies:
flutter:
diff --git a/packages/in_app_purchase/CHANGELOG.md b/packages/in_app_purchase/CHANGELOG.md
index fbbb870dcbe0..2f0e89e1cdec 100644
--- a/packages/in_app_purchase/CHANGELOG.md
+++ b/packages/in_app_purchase/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.2.1+3
+
+* Android : Improved testability.
+
## 0.2.1+2
* Android: Require a non-null Activity to use the `launchBillingFlow` method.
diff --git a/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/BillingClientFactory.java b/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/BillingClientFactory.java
new file mode 100644
index 000000000000..078986c04c86
--- /dev/null
+++ b/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/BillingClientFactory.java
@@ -0,0 +1,19 @@
+package io.flutter.plugins.inapppurchase;
+
+import android.content.Context;
+import com.android.billingclient.api.BillingClient;
+import io.flutter.plugin.common.MethodChannel;
+
+interface BillingClientFactory {
+ BillingClient createBillingClient(Context context, MethodChannel channel);
+}
+
+final class BillingClientFactoryImpl implements BillingClientFactory {
+
+ @Override
+ public BillingClient createBillingClient(Context context, MethodChannel channel) {
+ return BillingClient.newBuilder(context)
+ .setListener(new PluginPurchaseListener(channel))
+ .build();
+ }
+}
diff --git a/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/InAppPurchasePlugin.java b/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/InAppPurchasePlugin.java
index e914d2a455de..99f68842d1c0 100644
--- a/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/InAppPurchasePlugin.java
+++ b/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/InAppPurchasePlugin.java
@@ -19,7 +19,6 @@
import com.android.billingclient.api.ConsumeResponseListener;
import com.android.billingclient.api.Purchase;
import com.android.billingclient.api.PurchaseHistoryResponseListener;
-import com.android.billingclient.api.PurchasesUpdatedListener;
import com.android.billingclient.api.SkuDetails;
import com.android.billingclient.api.SkuDetailsParams;
import com.android.billingclient.api.SkuDetailsResponseListener;
@@ -37,6 +36,7 @@
public class InAppPurchasePlugin implements MethodCallHandler {
private static final String TAG = "InAppPurchasePlugin";
private @Nullable BillingClient billingClient;
+ private final BillingClientFactory factory;
private final Registrar registrar;
private final Context applicationContext;
private final MethodChannel channel;
@@ -69,12 +69,17 @@ static final class MethodNames {
public static void registerWith(Registrar registrar) {
final MethodChannel channel =
new MethodChannel(registrar.messenger(), "plugins.flutter.io/in_app_purchase");
- channel.setMethodCallHandler(new InAppPurchasePlugin(registrar, channel));
+
+ final BillingClientFactory factory = new BillingClientFactoryImpl();
+ final InAppPurchasePlugin plugin = new InAppPurchasePlugin(factory, registrar, channel);
+ channel.setMethodCallHandler(plugin);
}
- public InAppPurchasePlugin(Registrar registrar, MethodChannel channel) {
+ public InAppPurchasePlugin(
+ BillingClientFactory factory, Registrar registrar, MethodChannel channel) {
this.applicationContext = registrar.context();
this.registrar = registrar;
+ this.factory = factory;
this.channel = channel;
}
@@ -112,18 +117,9 @@ public void onMethodCall(MethodCall call, Result result) {
}
}
- @VisibleForTesting
- /*package*/ InAppPurchasePlugin(
- Registrar registrar, @Nullable BillingClient billingClient, MethodChannel channel) {
- this.billingClient = billingClient;
- this.channel = channel;
- this.applicationContext = registrar.context();
- this.registrar = registrar;
- }
-
private void startConnection(final int handle, final Result result) {
if (billingClient == null) {
- billingClient = buildBillingClient(applicationContext, channel);
+ billingClient = factory.createBillingClient(applicationContext, channel);
}
billingClient.startConnection(
@@ -282,27 +278,4 @@ private boolean billingClientError(Result result) {
result.error("UNAVAILABLE", "BillingClient is unset. Try reconnecting.", null);
return true;
}
-
- private static BillingClient buildBillingClient(Context context, MethodChannel channel) {
- return BillingClient.newBuilder(context)
- .setListener(new PluginPurchaseListener(channel))
- .build();
- }
-
- @VisibleForTesting
- /*package*/ static class PluginPurchaseListener implements PurchasesUpdatedListener {
- private final MethodChannel channel;
-
- PluginPurchaseListener(MethodChannel channel) {
- this.channel = channel;
- }
-
- @Override
- public void onPurchasesUpdated(int responseCode, @Nullable List purchases) {
- final Map callbackArgs = new HashMap<>();
- callbackArgs.put("responseCode", responseCode);
- callbackArgs.put("purchasesList", fromPurchasesList(purchases));
- channel.invokeMethod(MethodNames.ON_PURCHASES_UPDATED, callbackArgs);
- }
- }
}
diff --git a/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/PluginPurchaseListener.java b/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/PluginPurchaseListener.java
new file mode 100644
index 000000000000..f1de27eaacc8
--- /dev/null
+++ b/packages/in_app_purchase/android/src/main/java/io/flutter/plugins/inapppurchase/PluginPurchaseListener.java
@@ -0,0 +1,27 @@
+package io.flutter.plugins.inapppurchase;
+
+import static io.flutter.plugins.inapppurchase.Translator.fromPurchasesList;
+
+import androidx.annotation.Nullable;
+import com.android.billingclient.api.Purchase;
+import com.android.billingclient.api.PurchasesUpdatedListener;
+import io.flutter.plugin.common.MethodChannel;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+class PluginPurchaseListener implements PurchasesUpdatedListener {
+ private final MethodChannel channel;
+
+ PluginPurchaseListener(MethodChannel channel) {
+ this.channel = channel;
+ }
+
+ @Override
+ public void onPurchasesUpdated(int responseCode, @Nullable List purchases) {
+ final Map callbackArgs = new HashMap<>();
+ callbackArgs.put("responseCode", responseCode);
+ callbackArgs.put("purchasesList", fromPurchasesList(purchases));
+ channel.invokeMethod(InAppPurchasePlugin.MethodNames.ON_PURCHASES_UPDATED, callbackArgs);
+ }
+}
diff --git a/packages/in_app_purchase/example/android/app/src/test/java/io/flutter/plugins/inapppurchase/InAppPurchasePluginTest.java b/packages/in_app_purchase/example/android/app/src/test/java/io/flutter/plugins/inapppurchase/InAppPurchasePluginTest.java
index 41a60788691f..31118be8226a 100644
--- a/packages/in_app_purchase/example/android/app/src/test/java/io/flutter/plugins/inapppurchase/InAppPurchasePluginTest.java
+++ b/packages/in_app_purchase/example/android/app/src/test/java/io/flutter/plugins/inapppurchase/InAppPurchasePluginTest.java
@@ -29,7 +29,6 @@
import static org.mockito.Mockito.when;
import android.app.Activity;
-import android.content.Context;
import androidx.annotation.Nullable;
import com.android.billingclient.api.BillingClient;
import com.android.billingclient.api.BillingClient.BillingResponse;
@@ -43,12 +42,10 @@
import com.android.billingclient.api.SkuDetails;
import com.android.billingclient.api.SkuDetailsParams;
import com.android.billingclient.api.SkuDetailsResponseListener;
-import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.common.PluginRegistry;
-import io.flutter.plugins.inapppurchase.InAppPurchasePlugin.PluginPurchaseListener;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -60,20 +57,19 @@
import org.mockito.Spy;
public class InAppPurchasePluginTest {
- InAppPurchasePlugin plugin;
+ private InAppPurchasePlugin plugin;
@Mock BillingClient mockBillingClient;
@Mock MethodChannel mockMethodChannel;
@Spy Result result;
@Mock PluginRegistry.Registrar registrar;
@Mock Activity activity;
- @Mock BinaryMessenger messenger;
- @Mock Context context;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
- when(registrar.context()).thenReturn(context);
- plugin = new InAppPurchasePlugin(registrar, mockBillingClient, mockMethodChannel);
+
+ BillingClientFactory factory = (context, channel) -> mockBillingClient;
+ plugin = new InAppPurchasePlugin(factory, registrar, mockMethodChannel);
}
@Test
@@ -85,6 +81,7 @@ public void invalidMethod() {
@Test
public void isReady_true() {
+ mockStartConnection();
MethodCall call = new MethodCall(IS_READY, null);
when(mockBillingClient.isReady()).thenReturn(true);
plugin.onMethodCall(call, result);
@@ -93,6 +90,7 @@ public void isReady_true() {
@Test
public void isReady_false() {
+ mockStartConnection();
MethodCall call = new MethodCall(IS_READY, null);
when(mockBillingClient.isReady()).thenReturn(false);
plugin.onMethodCall(call, result);
@@ -113,14 +111,7 @@ public void isReady_clientDisconnected() {
@Test
public void startConnection() {
- Map arguments = new HashMap<>();
- arguments.put("handle", 1);
- MethodCall call = new MethodCall(START_CONNECTION, arguments);
- ArgumentCaptor captor =
- ArgumentCaptor.forClass(BillingClientStateListener.class);
- doNothing().when(mockBillingClient).startConnection(captor.capture());
-
- plugin.onMethodCall(call, result);
+ ArgumentCaptor captor = mockStartConnection();
verify(result, never()).success(any());
captor.getValue().onBillingSetupFinished(100);
@@ -452,6 +443,18 @@ public void consumeAsync() {
verify(result, times(1)).success(responseCode);
}
+ private ArgumentCaptor mockStartConnection() {
+ Map arguments = new HashMap<>();
+ arguments.put("handle", 1);
+ MethodCall call = new MethodCall(START_CONNECTION, arguments);
+ ArgumentCaptor captor =
+ ArgumentCaptor.forClass(BillingClientStateListener.class);
+ doNothing().when(mockBillingClient).startConnection(captor.capture());
+
+ plugin.onMethodCall(call, result);
+ return captor;
+ }
+
private void establishConnectedBillingClient(
@Nullable Map arguments, @Nullable Result result) {
if (arguments == null) {
diff --git a/packages/in_app_purchase/pubspec.yaml b/packages/in_app_purchase/pubspec.yaml
index d3a8cf0fa230..e8e9ceea8fc9 100644
--- a/packages/in_app_purchase/pubspec.yaml
+++ b/packages/in_app_purchase/pubspec.yaml
@@ -2,7 +2,7 @@ name: in_app_purchase
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
author: Flutter Team
homepage: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase
-version: 0.2.1+2
+version: 0.2.1+3
dependencies:
diff --git a/packages/instrumentation_adapter/CHANGELOG.md b/packages/instrumentation_adapter/CHANGELOG.md
index 73557c5c704a..f4cd692a1916 100644
--- a/packages/instrumentation_adapter/CHANGELOG.md
+++ b/packages/instrumentation_adapter/CHANGELOG.md
@@ -1,3 +1,14 @@
+## 0.1.3
+
+* Added example app.
+* Added stub iOS implementation.
+* Updated README.
+* No longer throws errors when running tests on the host.
+
+## 0.1.2
+
+* Added support for running tests using Flutter driver.
+
## 0.1.1
* Updates about using *androidx* library.
diff --git a/packages/instrumentation_adapter/README.md b/packages/instrumentation_adapter/README.md
index 81f515569ac5..1063589c615b 100644
--- a/packages/instrumentation_adapter/README.md
+++ b/packages/instrumentation_adapter/README.md
@@ -12,11 +12,10 @@ Add a dependency on the `instrumentation_adapter` package in the
pubspec.yaml of the example app.
Invoke `InstrumentationAdapterFlutterBinding.ensureInitialized()` at the start
-of a test file.
+of a test file, e.g.
```dart
import 'package:instrumentation_adapter/instrumentation_adapter.dart';
-import '../test/package_info.dart' as test;
void main() {
InstrumentationAdapterFlutterBinding.ensureInitialized();
@@ -90,3 +89,15 @@ gcloud firebase test android run --type instrumentation \
--results-bucket= \
--results-dir=
```
+
+## Flutter driver support
+
+`InstrumentationAdapterFlutterBinding` also reports test results to `FlutterDriver`
+when run on the command line via `flutter drive`.
+
+```dart
+ final FlutterDriver driver = await FlutterDriver.connect();
+ final String result = await driver.requestData(null, timeout: const Duration(minutes: 1));
+ driver.close();
+ exit(result == 'pass' ? 0 : 1);
+```
diff --git a/packages/instrumentation_adapter/example/.gitignore b/packages/instrumentation_adapter/example/.gitignore
new file mode 100644
index 000000000000..2ddde2a5e36f
--- /dev/null
+++ b/packages/instrumentation_adapter/example/.gitignore
@@ -0,0 +1,73 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+.dart_tool/
+.flutter-plugins
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Android related
+**/android/**/gradle-wrapper.jar
+**/android/.gradle
+**/android/captures/
+**/android/gradlew
+**/android/gradlew.bat
+**/android/local.properties
+**/android/**/GeneratedPluginRegistrant.java
+
+# iOS/XCode related
+**/ios/**/*.mode1v3
+**/ios/**/*.mode2v3
+**/ios/**/*.moved-aside
+**/ios/**/*.pbxuser
+**/ios/**/*.perspectivev3
+**/ios/**/*sync/
+**/ios/**/.sconsign.dblite
+**/ios/**/.tags*
+**/ios/**/.vagrant/
+**/ios/**/DerivedData/
+**/ios/**/Icon?
+**/ios/**/Pods/
+**/ios/**/.symlinks/
+**/ios/**/profile
+**/ios/**/xcuserdata
+**/ios/.generated/
+**/ios/Flutter/App.framework
+**/ios/Flutter/Flutter.framework
+**/ios/Flutter/Generated.xcconfig
+**/ios/Flutter/app.flx
+**/ios/Flutter/app.zip
+**/ios/Flutter/flutter_assets/
+**/ios/Flutter/flutter_export_environment.sh
+**/ios/ServiceDefinitions.json
+**/ios/Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!**/ios/**/default.mode1v3
+!**/ios/**/default.mode2v3
+!**/ios/**/default.pbxuser
+!**/ios/**/default.perspectivev3
+!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
diff --git a/examples/all_plugins/.metadata b/packages/instrumentation_adapter/example/.metadata
similarity index 82%
rename from examples/all_plugins/.metadata
rename to packages/instrumentation_adapter/example/.metadata
index c36997db797b..76f3d14cd0f9 100644
--- a/examples/all_plugins/.metadata
+++ b/packages/instrumentation_adapter/example/.metadata
@@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.
version:
- revision: 9114f4456cb8fd49e51bef9253e357225f209048
+ revision: 4fc11db5cc50345b7d64cb4015eb9a92229f6384
channel: master
project_type: app
diff --git a/examples/all_plugins/README.md b/packages/instrumentation_adapter/example/README.md
similarity index 84%
rename from examples/all_plugins/README.md
rename to packages/instrumentation_adapter/example/README.md
index fbf90fd034b9..f6030a4080b2 100644
--- a/examples/all_plugins/README.md
+++ b/packages/instrumentation_adapter/example/README.md
@@ -1,6 +1,6 @@
-# all_plugins
+# instrumentation_adapter_example
-Flutter app containing all 1st party plugins.
+Demonstrates how to use the instrumentation_adapter plugin.
## Getting Started
diff --git a/examples/all_plugins/android/app/build.gradle b/packages/instrumentation_adapter/example/android/app/build.gradle
similarity index 82%
rename from examples/all_plugins/android/app/build.gradle
rename to packages/instrumentation_adapter/example/android/app/build.gradle
index 9fbd496f70df..500e9ea951c6 100644
--- a/examples/all_plugins/android/app/build.gradle
+++ b/packages/instrumentation_adapter/example/android/app/build.gradle
@@ -1,5 +1,3 @@
-gradle.startParameter.showStacktrace = org.gradle.api.logging.configuration.ShowStacktrace.ALWAYS
-
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
@@ -35,9 +33,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "io.plugins.all_plugins"
+ applicationId "com.example.instrumentation_adapter_example"
minSdkVersion 16
- multiDexEnabled true
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
@@ -59,8 +56,6 @@ flutter {
dependencies {
testImplementation 'junit:junit:4.12'
- implementation 'com.google.guava:guava:27.0.1-android'
- androidTestImplementation 'androidx.test:runner:1.1.0'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
- api 'androidx.exifinterface:exifinterface:1.0.0'
+ androidTestImplementation 'androidx.test:runner:1.2.0'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
diff --git a/packages/instrumentation_adapter/example/android/app/src/androidTest/java/com/example/instrumentation_adapter_example/MainActivityTest.java b/packages/instrumentation_adapter/example/android/app/src/androidTest/java/com/example/instrumentation_adapter_example/MainActivityTest.java
new file mode 100644
index 000000000000..bb489bf57942
--- /dev/null
+++ b/packages/instrumentation_adapter/example/android/app/src/androidTest/java/com/example/instrumentation_adapter_example/MainActivityTest.java
@@ -0,0 +1,11 @@
+package com.example.instrumentation_adapter_example;
+
+import androidx.test.rule.ActivityTestRule;
+import dev.flutter.plugins.instrumentationadapter.FlutterRunner;
+import org.junit.Rule;
+import org.junit.runner.RunWith;
+
+@RunWith(FlutterRunner.class)
+public class MainActivityTest {
+ @Rule public ActivityTestRule rule = new ActivityTestRule<>(MainActivity.class);
+}
diff --git a/examples/all_plugins/android/app/src/debug/AndroidManifest.xml b/packages/instrumentation_adapter/example/android/app/src/debug/AndroidManifest.xml
similarity index 83%
rename from examples/all_plugins/android/app/src/debug/AndroidManifest.xml
rename to packages/instrumentation_adapter/example/android/app/src/debug/AndroidManifest.xml
index 278e553fdf19..87cc33d27c03 100644
--- a/examples/all_plugins/android/app/src/debug/AndroidManifest.xml
+++ b/packages/instrumentation_adapter/example/android/app/src/debug/AndroidManifest.xml
@@ -1,5 +1,5 @@
+ package="com.example.instrumentation_adapter_example">
diff --git a/examples/all_plugins/android/app/src/main/AndroidManifest.xml b/packages/instrumentation_adapter/example/android/app/src/main/AndroidManifest.xml
similarity index 89%
rename from examples/all_plugins/android/app/src/main/AndroidManifest.xml
rename to packages/instrumentation_adapter/example/android/app/src/main/AndroidManifest.xml
index fc8cb90afaa3..653fa39a669d 100644
--- a/examples/all_plugins/android/app/src/main/AndroidManifest.xml
+++ b/packages/instrumentation_adapter/example/android/app/src/main/AndroidManifest.xml
@@ -1,8 +1,5 @@
-
-
+ package="com.example.instrumentation_adapter_example">
+ package="com.example.instrumentation_adapter_example">
diff --git a/examples/all_plugins/android/build.gradle b/packages/instrumentation_adapter/example/android/build.gradle
similarity index 72%
rename from examples/all_plugins/android/build.gradle
rename to packages/instrumentation_adapter/example/android/build.gradle
index ad6301ce2ad9..bb8a303898ca 100644
--- a/examples/all_plugins/android/build.gradle
+++ b/packages/instrumentation_adapter/example/android/build.gradle
@@ -1,5 +1,3 @@
-gradle.startParameter.showStacktrace = org.gradle.api.logging.configuration.ShowStacktrace.ALWAYS
-
buildscript {
repositories {
google()
@@ -7,7 +5,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.3.1'
+ classpath 'com.android.tools.build:gradle:3.2.1'
}
}
diff --git a/packages/instrumentation_adapter/example/android/gradle.properties b/packages/instrumentation_adapter/example/android/gradle.properties
new file mode 100644
index 000000000000..2bd6f4fda009
--- /dev/null
+++ b/packages/instrumentation_adapter/example/android/gradle.properties
@@ -0,0 +1,2 @@
+org.gradle.jvmargs=-Xmx1536M
+
diff --git a/examples/all_plugins/android/gradle/wrapper/gradle-wrapper.properties b/packages/instrumentation_adapter/example/android/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from examples/all_plugins/android/gradle/wrapper/gradle-wrapper.properties
rename to packages/instrumentation_adapter/example/android/gradle/wrapper/gradle-wrapper.properties
diff --git a/examples/all_plugins/android/settings.gradle b/packages/instrumentation_adapter/example/android/settings.gradle
similarity index 100%
rename from examples/all_plugins/android/settings.gradle
rename to packages/instrumentation_adapter/example/android/settings.gradle
diff --git a/packages/instrumentation_adapter/example/instrumentation_adapter/widget_test.dart b/packages/instrumentation_adapter/example/instrumentation_adapter/widget_test.dart
new file mode 100644
index 000000000000..9829553c6522
--- /dev/null
+++ b/packages/instrumentation_adapter/example/instrumentation_adapter/widget_test.dart
@@ -0,0 +1,5 @@
+import '../test_driver/widget.dart' as test;
+
+void main() {
+ test.main();
+}
diff --git a/examples/all_plugins/ios/Flutter/AppFrameworkInfo.plist b/packages/instrumentation_adapter/example/ios/Flutter/AppFrameworkInfo.plist
similarity index 94%
rename from examples/all_plugins/ios/Flutter/AppFrameworkInfo.plist
rename to packages/instrumentation_adapter/example/ios/Flutter/AppFrameworkInfo.plist
index 9367d483e44e..6b4c0f78a785 100644
--- a/examples/all_plugins/ios/Flutter/AppFrameworkInfo.plist
+++ b/packages/instrumentation_adapter/example/ios/Flutter/AppFrameworkInfo.plist
@@ -3,7 +3,7 @@
CFBundleDevelopmentRegion
- en
+ $(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
App
CFBundleIdentifier
diff --git a/packages/instrumentation_adapter/example/ios/Flutter/Debug.xcconfig b/packages/instrumentation_adapter/example/ios/Flutter/Debug.xcconfig
new file mode 100644
index 000000000000..e8efba114687
--- /dev/null
+++ b/packages/instrumentation_adapter/example/ios/Flutter/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/packages/instrumentation_adapter/example/ios/Flutter/Release.xcconfig b/packages/instrumentation_adapter/example/ios/Flutter/Release.xcconfig
new file mode 100644
index 000000000000..399e9340e6f6
--- /dev/null
+++ b/packages/instrumentation_adapter/example/ios/Flutter/Release.xcconfig
@@ -0,0 +1,2 @@
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/examples/all_plugins/ios/Runner.xcodeproj/project.pbxproj b/packages/instrumentation_adapter/example/ios/Runner.xcodeproj/project.pbxproj
similarity index 83%
rename from examples/all_plugins/ios/Runner.xcodeproj/project.pbxproj
rename to packages/instrumentation_adapter/example/ios/Runner.xcodeproj/project.pbxproj
index df9cc66441db..88aca9f4d27e 100644
--- a/examples/all_plugins/ios/Runner.xcodeproj/project.pbxproj
+++ b/packages/instrumentation_adapter/example/ios/Runner.xcodeproj/project.pbxproj
@@ -13,12 +13,12 @@
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+ F81AEF02CE63DA0020B29F57 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 241E53603CE376E3BCB194D3 /* libPods-Runner.a */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -37,8 +37,10 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 0D6F1CB5DBBEBCC75AFAD041 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 241E53603CE376E3BCB194D3 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
@@ -53,6 +55,8 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ D69CCAD5F82E76E2E22BFA96 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
+ E23EF4D45DAE46B9DDB9B445 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -62,12 +66,21 @@
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
+ F81AEF02CE63DA0020B29F57 /* libPods-Runner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 42D734D13B733A64B01A24A9 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 241E53603CE376E3BCB194D3 /* libPods-Runner.a */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
@@ -87,7 +100,8 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
- CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
+ BAB55133DD7BD81A2557E916 /* Pods */,
+ 42D734D13B733A64B01A24A9 /* Frameworks */,
);
sourceTree = "";
};
@@ -123,6 +137,17 @@
name = "Supporting Files";
sourceTree = "";
};
+ BAB55133DD7BD81A2557E916 /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ D69CCAD5F82E76E2E22BFA96 /* Pods-Runner.debug.xcconfig */,
+ 0D6F1CB5DBBEBCC75AFAD041 /* Pods-Runner.release.xcconfig */,
+ E23EF4D45DAE46B9DDB9B445 /* Pods-Runner.profile.xcconfig */,
+ );
+ name = Pods;
+ path = Pods;
+ sourceTree = "";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -130,12 +155,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
+ 2882CCC16181B61F1ABC876C /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ 0D321280D358770769172C49 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -152,7 +179,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0910;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -162,7 +189,7 @@
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
@@ -185,7 +212,6 @@
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
- 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
@@ -194,6 +220,43 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 0D321280D358770769172C49 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 2882CCC16181B61F1ABC876C /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -271,12 +334,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -300,6 +365,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -311,7 +377,6 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = S8QB4VV633;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -323,7 +388,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- PRODUCT_BUNDLE_IDENTIFIER = io.plugins.allPlugins;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.instrumentationAdapterExample;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
@@ -343,12 +408,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -397,12 +464,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -426,6 +495,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -448,7 +518,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- PRODUCT_BUNDLE_IDENTIFIER = io.plugins.allPlugins;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.instrumentationAdapterExample;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
@@ -471,7 +541,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- PRODUCT_BUNDLE_IDENTIFIER = io.plugins.allPlugins;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.instrumentationAdapterExample;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
diff --git a/examples/all_plugins/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/instrumentation_adapter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
similarity index 97%
rename from examples/all_plugins/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
rename to packages/instrumentation_adapter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 786d6aad5457..a28140cfdb3f 100644
--- a/examples/all_plugins/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/packages/instrumentation_adapter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
@@ -46,7 +45,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
diff --git a/examples/all_plugins/ios/Runner/AppDelegate.h b/packages/instrumentation_adapter/example/ios/Runner/AppDelegate.h
similarity index 100%
rename from examples/all_plugins/ios/Runner/AppDelegate.h
rename to packages/instrumentation_adapter/example/ios/Runner/AppDelegate.h
diff --git a/examples/all_plugins/ios/Runner/AppDelegate.m b/packages/instrumentation_adapter/example/ios/Runner/AppDelegate.m
similarity index 100%
rename from examples/all_plugins/ios/Runner/AppDelegate.m
rename to packages/instrumentation_adapter/example/ios/Runner/AppDelegate.m
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 000000000000..dc9ada4725e9
Binary files /dev/null and b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
diff --git a/examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
similarity index 100%
rename from examples/all_plugins/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
rename to packages/instrumentation_adapter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
diff --git a/examples/all_plugins/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/instrumentation_adapter/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
similarity index 100%
rename from examples/all_plugins/ios/Runner/Base.lproj/LaunchScreen.storyboard
rename to packages/instrumentation_adapter/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
diff --git a/examples/all_plugins/ios/Runner/Base.lproj/Main.storyboard b/packages/instrumentation_adapter/example/ios/Runner/Base.lproj/Main.storyboard
similarity index 100%
rename from examples/all_plugins/ios/Runner/Base.lproj/Main.storyboard
rename to packages/instrumentation_adapter/example/ios/Runner/Base.lproj/Main.storyboard
diff --git a/examples/all_plugins/ios/Runner/Info.plist b/packages/instrumentation_adapter/example/ios/Runner/Info.plist
similarity index 93%
rename from examples/all_plugins/ios/Runner/Info.plist
rename to packages/instrumentation_adapter/example/ios/Runner/Info.plist
index 127a08b03f39..613203aaeb06 100644
--- a/examples/all_plugins/ios/Runner/Info.plist
+++ b/packages/instrumentation_adapter/example/ios/Runner/Info.plist
@@ -3,7 +3,7 @@
CFBundleDevelopmentRegion
- en
+ $(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
@@ -11,7 +11,7 @@
CFBundleInfoDictionaryVersion
6.0
CFBundleName
- all_plugins
+ instrumentation_adapter_example
CFBundlePackageType
APPL
CFBundleShortVersionString
@@ -41,7 +41,5 @@
UIViewControllerBasedStatusBarAppearance
- io.flutter.embedded_views_preview
-
diff --git a/examples/all_plugins/ios/Runner/main.m b/packages/instrumentation_adapter/example/ios/Runner/main.m
similarity index 100%
rename from examples/all_plugins/ios/Runner/main.m
rename to packages/instrumentation_adapter/example/ios/Runner/main.m
diff --git a/packages/instrumentation_adapter/example/lib/main.dart b/packages/instrumentation_adapter/example/lib/main.dart
new file mode 100644
index 000000000000..c1206d562f88
--- /dev/null
+++ b/packages/instrumentation_adapter/example/lib/main.dart
@@ -0,0 +1,25 @@
+import 'dart:io' show Platform;
+import 'package:flutter/material.dart';
+
+void main() => runApp(MyApp());
+
+class MyApp extends StatefulWidget {
+ @override
+ _MyAppState createState() => _MyAppState();
+}
+
+class _MyAppState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ home: Scaffold(
+ appBar: AppBar(
+ title: const Text('Plugin example app'),
+ ),
+ body: Center(
+ child: Text('Platform: ${Platform.operatingSystem}\n'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/packages/instrumentation_adapter/example/pubspec.yaml b/packages/instrumentation_adapter/example/pubspec.yaml
new file mode 100644
index 000000000000..55d547736b24
--- /dev/null
+++ b/packages/instrumentation_adapter/example/pubspec.yaml
@@ -0,0 +1,26 @@
+name: instrumentation_adapter_example
+description: Demonstrates how to use the instrumentation_adapter plugin.
+publish_to: 'none'
+
+environment:
+ sdk: ">=2.1.0 <3.0.0"
+
+dependencies:
+ flutter:
+ sdk: flutter
+
+ cupertino_icons: ^0.1.2
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+ flutter_driver:
+ sdk: flutter
+ instrumentation_adapter:
+ path: ../
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+flutter:
+ uses-material-design: true
diff --git a/examples/all_plugins/test/widget_test.dart b/packages/instrumentation_adapter/example/test_driver/widget.dart
similarity index 50%
rename from examples/all_plugins/test/widget_test.dart
rename to packages/instrumentation_adapter/example/test_driver/widget.dart
index 809cad928ec8..109002c86790 100644
--- a/examples/all_plugins/test/widget_test.dart
+++ b/packages/instrumentation_adapter/example/test_driver/widget.dart
@@ -5,26 +5,27 @@
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
+import 'dart:io' show Platform;
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
+import 'package:instrumentation_adapter/instrumentation_adapter.dart';
-import 'package:all_plugins/main.dart';
+import 'package:instrumentation_adapter_example/main.dart';
void main() {
- testWidgets('Counter increments smoke test', (WidgetTester tester) async {
+ InstrumentationAdapterFlutterBinding.ensureInitialized();
+ testWidgets('verify text', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
- // Verify that our counter starts at 0.
- expect(find.text('0'), findsOneWidget);
- expect(find.text('1'), findsNothing);
-
- // Tap the '+' icon and trigger a frame.
- await tester.tap(find.byIcon(Icons.add));
- await tester.pump();
-
- // Verify that our counter has incremented.
- expect(find.text('0'), findsNothing);
- expect(find.text('1'), findsOneWidget);
+ // Verify that platform version is retrieved.
+ expect(
+ find.byWidgetPredicate(
+ (Widget widget) =>
+ widget is Text &&
+ widget.data.startsWith('Platform: ${Platform.operatingSystem}'),
+ ),
+ findsOneWidget,
+ );
});
}
diff --git a/packages/instrumentation_adapter/example/test_driver/widget_test.dart b/packages/instrumentation_adapter/example/test_driver/widget_test.dart
new file mode 100644
index 000000000000..88e53d1c1f05
--- /dev/null
+++ b/packages/instrumentation_adapter/example/test_driver/widget_test.dart
@@ -0,0 +1,9 @@
+import 'dart:async';
+
+import 'package:flutter_driver/flutter_driver.dart';
+
+Future main() async {
+ final FlutterDriver driver = await FlutterDriver.connect();
+ await driver.requestData(null, timeout: const Duration(minutes: 1));
+ driver.close();
+}
diff --git a/packages/instrumentation_adapter/ios/.gitignore b/packages/instrumentation_adapter/ios/.gitignore
new file mode 100644
index 000000000000..aa479fd3ce8a
--- /dev/null
+++ b/packages/instrumentation_adapter/ios/.gitignore
@@ -0,0 +1,37 @@
+.idea/
+.vagrant/
+.sconsign.dblite
+.svn/
+
+.DS_Store
+*.swp
+profile
+
+DerivedData/
+build/
+GeneratedPluginRegistrant.h
+GeneratedPluginRegistrant.m
+
+.generated/
+
+*.pbxuser
+*.mode1v3
+*.mode2v3
+*.perspectivev3
+
+!default.pbxuser
+!default.mode1v3
+!default.mode2v3
+!default.perspectivev3
+
+xcuserdata
+
+*.moved-aside
+
+*.pyc
+*sync/
+Icon?
+.tags*
+
+/Flutter/Generated.xcconfig
+/Flutter/flutter_export_environment.sh
\ No newline at end of file
diff --git a/packages/instrumentation_adapter/ios/Assets/.gitkeep b/packages/instrumentation_adapter/ios/Assets/.gitkeep
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/packages/instrumentation_adapter/ios/Classes/InstrumentationAdapterPlugin.h b/packages/instrumentation_adapter/ios/Classes/InstrumentationAdapterPlugin.h
new file mode 100644
index 000000000000..3d92ba91bf34
--- /dev/null
+++ b/packages/instrumentation_adapter/ios/Classes/InstrumentationAdapterPlugin.h
@@ -0,0 +1,4 @@
+#import
+
+@interface InstrumentationAdapterPlugin : NSObject
+@end
diff --git a/packages/instrumentation_adapter/ios/Classes/InstrumentationAdapterPlugin.m b/packages/instrumentation_adapter/ios/Classes/InstrumentationAdapterPlugin.m
new file mode 100644
index 000000000000..704a5b05e031
--- /dev/null
+++ b/packages/instrumentation_adapter/ios/Classes/InstrumentationAdapterPlugin.m
@@ -0,0 +1,20 @@
+#import "InstrumentationAdapterPlugin.h"
+
+@implementation InstrumentationAdapterPlugin
++ (void)registerWithRegistrar:(NSObject*)registrar {
+ FlutterMethodChannel* channel = [FlutterMethodChannel
+ methodChannelWithName:@"dev.flutter/InstrumentationAdapterFlutterBinding"
+ binaryMessenger:[registrar messenger]];
+ InstrumentationAdapterPlugin* instance = [[InstrumentationAdapterPlugin alloc] init];
+ [registrar addMethodCallDelegate:instance channel:channel];
+}
+
+- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
+ if ([@"allTestsFinished" isEqualToString:call.method]) {
+ result(nil);
+ } else {
+ result(FlutterMethodNotImplemented);
+ }
+}
+
+@end
diff --git a/packages/instrumentation_adapter/ios/instrumentation_adapter.podspec b/packages/instrumentation_adapter/ios/instrumentation_adapter.podspec
new file mode 100644
index 000000000000..c18e58535998
--- /dev/null
+++ b/packages/instrumentation_adapter/ios/instrumentation_adapter.podspec
@@ -0,0 +1,21 @@
+#
+# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
+#
+Pod::Spec.new do |s|
+ s.name = 'instrumentation_adapter'
+ s.version = '0.0.1'
+ s.summary = 'Instrumentation adapter.'
+ s.description = <<-DESC
+Runs tests that use the flutter_test API as integration tests.
+ DESC
+ s.homepage = 'https://github.com/flutter/plugins/tree/master/packages/instrumentation_adapter'
+ s.license = { :file => '../LICENSE' }
+ s.author = { 'Flutter Team' => 'flutter-dev@googlegroups.com' }
+ s.source = { :path => '.' }
+ s.source_files = 'Classes/**/*'
+ s.public_header_files = 'Classes/**/*.h'
+ s.dependency 'Flutter'
+
+ s.ios.deployment_target = '8.0'
+end
+
diff --git a/packages/instrumentation_adapter/lib/instrumentation_adapter.dart b/packages/instrumentation_adapter/lib/instrumentation_adapter.dart
index 81f81872d950..9999452234cd 100644
--- a/packages/instrumentation_adapter/lib/instrumentation_adapter.dart
+++ b/packages/instrumentation_adapter/lib/instrumentation_adapter.dart
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+import 'dart:async';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
@@ -14,11 +15,18 @@ class InstrumentationAdapterFlutterBinding
InstrumentationAdapterFlutterBinding() {
// TODO(jackson): Report test results as they arrive
tearDownAll(() async {
- await _channel.invokeMethod(
- 'allTestsFinished', {'results': _results});
+ try {
+ await _channel.invokeMethod(
+ 'allTestsFinished', {'results': _results});
+ } on MissingPluginException {
+ // Tests were run on the host rather than a device.
+ }
+ if (!_allTestsPassed.isCompleted) _allTestsPassed.complete(true);
});
}
+ final Completer _allTestsPassed = Completer();
+
static WidgetsBinding ensureInitialized() {
if (WidgetsBinding.instance == null) {
InstrumentationAdapterFlutterBinding();
@@ -32,14 +40,46 @@ class InstrumentationAdapterFlutterBinding
static Map _results = {};
+ // Emulates the Flutter driver extension, returning 'pass' or 'fail'.
+ @override
+ void initServiceExtensions() {
+ super.initServiceExtensions();
+ Future