Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ task:
matrix:
- name: publishable
script:
# Temporarily disabling CI on stable to allow using new Flutter features closely
# before a new release.
# TODO(franciscojma): re-enable this
- flutter channel master
- flutter channel stable
- ./script/check_publish.sh
- name: format
install_script:
Expand All @@ -32,11 +29,7 @@ task:
env:
matrix:
CHANNEL: "master"
# Temporarily disabling CI on stable to allow using new Flutter features closely
# before a new release.
# TODO(amirh): re-enable this
# https://github.com/flutter/flutter/issues/46258
# CHANNEL: "stable"
CHANNEL: "stable"
test_script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
Expand All @@ -59,11 +52,7 @@ task:
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
matrix:
CHANNEL: "master"
# Temporarily disabling CI on stable to allow using new Flutter features closely
# before a new release.
# TODO(amirh): re-enable this
# https://github.com/flutter/flutter/issues/46258
# CHANNEL: "stable"
CHANNEL: "stable"
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4]
script:
Expand Down Expand Up @@ -130,11 +119,7 @@ task:
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
matrix:
CHANNEL: "master"
# Temporarily disabling CI on stable to allow using new Flutter features closely
# before a new release.
# TODO(amirh): re-enable this
# https://github.com/flutter/flutter/issues/46258
# CHANNEL: "stable"
CHANNEL: "stable"
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
build_script:
# TODO(jackson): Allow web plugins once supported on stable
Expand Down
4 changes: 4 additions & 0 deletions packages/battery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.1+7

* Clean up various Android workarounds no longer needed after framework v1.12.

## 0.3.1+6

* Remove the deprecated `author:` field from pubspec.yaml
Expand Down
26 changes: 0 additions & 26 deletions packages/battery/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,3 @@ android {
disable 'InvalidPackage'
}
}

// TODO(amirh): Remove this hack once androidx.lifecycle is included on stable. https://github.com/flutter/flutter/issues/42348
afterEvaluate {
def containsEmbeddingDependencies = false
for (def configuration : configurations.all) {
for (def dependency : configuration.dependencies) {
if (dependency.group == 'io.flutter' &&
dependency.name.startsWith('flutter_embedding') &&
dependency.isTransitive())
{
containsEmbeddingDependencies = true
break
}
}
}
if (!containsEmbeddingDependencies) {
android {
dependencies {
def lifecycle_version = "1.1.1"
compileOnly "android.arch.lifecycle:runtime:$lifecycle_version"
compileOnly "android.arch.lifecycle:common:$lifecycle_version"
compileOnly "android.arch.lifecycle:common-java8:$lifecycle_version"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ public static void registerWith(PluginRegistry.Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
onAttachedToEngine(
binding.getApplicationContext(), binding.getFlutterEngine().getDartExecutor());
onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger());
}

private void onAttachedToEngine(Context applicationContext, BinaryMessenger messenger) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@

import androidx.test.rule.ActivityTestRule;
import dev.flutter.plugins.e2e.FlutterRunner;
import io.flutter.embedding.android.FlutterActivity;
import org.junit.Rule;
import org.junit.runner.RunWith;

@RunWith(FlutterRunner.class)
public class MainActivityTest {
@Rule public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class);
public class FlutterActivityTest {
@Rule
public ActivityTestRule<FlutterActivity> rule = new ActivityTestRule<>(FlutterActivity.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<uses-permission android:name="android.permission.INTERNET"/>

<application android:name="io.flutter.app.FlutterApplication" android:label="battery_example" android:icon="@mipmap/ic_launcher">
<activity android:name=".MainActivity"
<activity android:name="io.flutter.embedding.android.FlutterActivity"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
Expand All @@ -22,5 +22,8 @@
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
</activity>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
package io.flutter.plugins.batteryexample;

import android.os.Bundle;
import dev.flutter.plugins.e2e.E2EPlugin;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.plugins.battery.BatteryPlugin;

public class EmbedderV1Activity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
BatteryPlugin.registerWith(registrarFor("io.flutter.plugins.battery.BatteryPlugin"));
E2EPlugin.registerWith(registrarFor("dev.flutter.plugins.e2e.E2EPlugin"));
}
}

This file was deleted.

2 changes: 1 addition & 1 deletion packages/battery/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: battery
description: Flutter plugin for accessing information about the battery state
(full, charging, discharging) on Android and iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/battery
version: 0.3.1+6
version: 0.3.1+7

flutter:
plugin:
Expand Down
8 changes: 8 additions & 0 deletions packages/google_sign_in/google_sign_in/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 4.1.2

* Added a new error code `network_error`, and return it when a network error occurred.

## 4.1.1

* Support passing `clientId` to the web plugin programmatically.

## 4.1.0

* Support web by default.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public static final class Delegate implements IDelegate, PluginRegistry.Activity
// These error codes must match with ones declared on iOS and Dart sides.
private static final String ERROR_REASON_SIGN_IN_CANCELED = "sign_in_canceled";
private static final String ERROR_REASON_SIGN_IN_REQUIRED = "sign_in_required";
private static final String ERROR_REASON_NETWORK_ERROR = "network_error";
private static final String ERROR_REASON_SIGN_IN_FAILED = "sign_in_failed";
private static final String ERROR_FAILURE_TO_RECOVER_AUTH = "failed_to_recover_auth";
private static final String ERROR_USER_RECOVERABLE_AUTH = "user_recoverable_auth";
Expand Down Expand Up @@ -372,6 +373,8 @@ private String errorCodeForStatus(int statusCode) {
return ERROR_REASON_SIGN_IN_CANCELED;
} else if (statusCode == CommonStatusCodes.SIGN_IN_REQUIRED) {
return ERROR_REASON_SIGN_IN_REQUIRED;
} else if (statusCode == CommonStatusCodes.NETWORK_ERROR) {
return ERROR_REASON_NETWORK_ERROR;
} else {
return ERROR_REASON_SIGN_IN_FAILED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// These error codes must match with ones declared on Android and Dart sides.
static NSString *const kErrorReasonSignInRequired = @"sign_in_required";
static NSString *const kErrorReasonSignInCanceled = @"sign_in_canceled";
static NSString *const kErrorReasonNetworkError = @"network_error";
static NSString *const kErrorReasonSignInFailed = @"sign_in_failed";

static FlutterError *getFlutterError(NSError *error) {
Expand All @@ -21,6 +22,8 @@
errorCode = kErrorReasonSignInRequired;
} else if (error.code == kGIDSignInErrorCodeCanceled) {
errorCode = kErrorReasonSignInCanceled;
} else if ([error.domain isEqualToString:NSURLErrorDomain]) {
errorCode = kErrorReasonNetworkError;
} else {
errorCode = kErrorReasonSignInFailed;
}
Expand Down
13 changes: 11 additions & 2 deletions packages/google_sign_in/google_sign_in/lib/google_sign_in.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class GoogleSignIn {
this.signInOption = SignInOption.standard,
this.scopes = const <String>[],
this.hostedDomain,
this.clientId,
});

/// Factory for creating default sign in user experience.
Expand Down Expand Up @@ -194,6 +195,9 @@ class GoogleSignIn {
/// user.
static const String kSignInCanceledError = 'sign_in_canceled';

/// Error code indicating network error. Retrying should resolve the problem.
static const String kNetworkError = 'network_error';

/// Error code indicating that attempt to sign in failed.
static const String kSignInFailedError = 'sign_in_failed';

Expand All @@ -207,6 +211,9 @@ class GoogleSignIn {
/// Domain to restrict sign-in to.
final String hostedDomain;

/// Client ID being used to connect to google sign-in. Only supported on web.
final String clientId;

StreamController<GoogleSignInAccount> _currentUserController =
StreamController<GoogleSignInAccount>.broadcast();

Expand Down Expand Up @@ -240,6 +247,7 @@ class GoogleSignIn {
signInOption: signInOption,
scopes: scopes,
hostedDomain: hostedDomain,
clientId: clientId,
)..catchError((dynamic _) {
// Invalidate initialization if it errors out.
_initialization = null;
Expand Down Expand Up @@ -309,8 +317,9 @@ class GoogleSignIn {
///
/// When [suppressErrors] is set to `false` and an error occurred during sign in
/// returned Future completes with [PlatformException] whose `code` can be
/// either [kSignInRequiredError] (when there is no authenticated user) or
/// [kSignInFailedError] (when an unknown error occurred).
/// one of [kSignInRequiredError] (when there is no authenticated user) ,
/// [kNetworkError] (when a network error occurred) or [kSignInFailedError]
/// (when an unknown error occurred).
Future<GoogleSignInAccount> signInSilently({
bool suppressErrors = true,
}) async {
Expand Down
2 changes: 1 addition & 1 deletion packages/google_sign_in/google_sign_in/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_sign_in
description: Flutter plugin for Google Sign-In, a secure authentication system
for signing in with a Google account on Android and iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/google_sign_in/google_sign_in
version: 4.1.0
version: 4.1.2

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/in_app_purchase/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.2+6

* Correct a comment.

## 0.2.2+5

* Update version of json_annotation to ^3.0.0 and json_serializable to ^3.2.0. Resolve conflicts with other packages e.g. flutter_tools from sdk.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class PurchaseDetails {

/// Points back to the `BillingClient`'s [PurchaseWrapper] object that generated this [PurchaseDetails] object.
///
/// This is null on Android.
/// This is null on iOS.
final PurchaseWrapper billingClientPurchase;

PurchaseDetails({
Expand Down
2 changes: 1 addition & 1 deletion packages/in_app_purchase/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,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.
homepage: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase
version: 0.2.2+5
version: 0.2.2+6


dependencies:
Expand Down
6 changes: 6 additions & 0 deletions packages/webview_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.3.19+1

* Raise min Flutter SDK requirement to the latest stable. v2 embedding apps no
longer need to special case their Flutter SDK requirement like they have
since v0.3.15+3.

## 0.3.19

* Add setting for iOS to allow gesture based navigation.
Expand Down
25 changes: 0 additions & 25 deletions packages/webview_flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,3 @@ android {
implementation 'androidx.webkit:webkit:1.0.0'
}
}

// TODO(mklim): Remove this hack once androidx.lifecycle is included on stable. https://github.com/flutter/flutter/issues/42348
afterEvaluate {
def containsEmbeddingDependencies = false
for (def configuration : configurations.all) {
for (def dependency : configuration.dependencies) {
if (dependency.group == 'io.flutter' &&
dependency.name.startsWith('flutter_embedding') &&
dependency.isTransitive())
{
containsEmbeddingDependencies = true
break
}
}
}
if (!containsEmbeddingDependencies) {
android {
dependencies {
def lifecycle_version = "1.1.1"
compileOnly "android.arch.lifecycle:common-java8:$lifecycle_version"
compileOnly "android.arch.lifecycle:runtime:$lifecycle_version"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import androidx.test.rule.ActivityTestRule;
import dev.flutter.plugins.e2e.FlutterRunner;
import io.flutter.embedding.android.FlutterActivity;
import org.junit.Rule;
import org.junit.runner.RunWith;

@RunWith(FlutterRunner.class)
public class MainActivityTest {
@Rule public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class);
@Rule
public ActivityTestRule<FlutterActivity> rule = new ActivityTestRule<>(FlutterActivity.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
android:icon="@mipmap/ic_launcher"
android:label="webview_flutter_example"
android:name="io.flutter.app.FlutterApplication">
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:exported="true"
Expand All @@ -30,7 +33,7 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:name=".MainActivity"
android:name="io.flutter.embedding.android.FlutterActivity"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
package io.flutter.plugins.webviewflutterexample;

import android.os.Bundle;
import dev.flutter.plugins.e2e.E2EPlugin;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.plugins.webviewflutter.WebViewFlutterPlugin;

public class EmbeddingV1Activity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
E2EPlugin.registerWith(registrarFor("dev.flutter.plugins.e2e.E2EPlugin"));
WebViewFlutterPlugin.registerWith(
registrarFor("io.flutter.plugins.webviewflutter.WebViewFlutterPlugin"));
}
}
Loading