Skip to content

Commit

Permalink
Merge commit 'bfc666daa89698c9fdc342e7ae521ec5e4e8ec5b'
Browse files Browse the repository at this point in the history
* commit 'bfc666daa89698c9fdc342e7ae521ec5e4e8ec5b': (59 commits)
  Fix analyze errors
  Make fcmSetupBackgroundChannel private
  Make fcmSetupBackgroundChannel top-level
  fix formatting
  fix analyze issues
  address comments
  Wrap chanel result logic in LatchResult
  Migration of flutter/plugins#1900
  Remove emulators references from .cirrus.yaml
  format
  initial
  Update issue templates
  Update version/changelog per PR guidelines
  Remove duplicate example.
  reformat
  Update docs to encourage contributors to self-label PRs with the plugin they affect
  Manual merge of rejected diff
  Migrate PR
  Fix analyzer failures + reformat
  reformat
  ...
  • Loading branch information
ryohorie committed Sep 9, 2019
2 parents ccbc689 + bfc666d commit 9ffb10d
Show file tree
Hide file tree
Showing 179 changed files with 3,094 additions and 268 deletions.
6 changes: 0 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ task:
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
create_device_script:
echo no | avdmanager -v create avd -n test -k "system-images;android-21;default;armeabi-v7a"
start_emulator_background_script:
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window
wait_for_emulator_script: adb wait-for-device
script:
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
# might include non-ASCII characters which makes Gradle crash.
Expand All @@ -46,9 +43,6 @@ task:
- export CIRRUS_COMMIT_MESSAGE=""
- ./script/incremental_build.sh build-examples --apk
- ./script/incremental_build.sh java-test # must come after apk build
# TODO(jackson): Re-enable once Android emulators support Firebase
# https://github.com/flutter/flutter/issues/29571
# - ./script/incremental_build.sh drive-examples
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`

Expand Down
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Issues identifying existing FlutterFire features that are not working as expected.
title: "[<FIREBASE_PRODUCT>] <TITLE>"
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. '...'
4. See error or incorrect behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Issues requesting Firebase features be added to or improved.
title: "[<FIREBASE_PRODUCT>] <TITLE>"
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request here.
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process.

- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [ ] If the pull request affects only one plugin, the PR title starts with the name of the plugin in brackets (e.g. [cloud_firestore])
- [ ] My PR includes unit or integration tests for *all* changed/updated/fixed behaviors (See [Contributor Guide]).
- [ ] All existing and new tests are passing.
- [ ] I updated/added relevant documentation (doc comments with `///`).
Expand All @@ -31,7 +32,7 @@ Does your PR require plugin users to manually update their apps to accommodate y

<!-- Links -->
[issue database]: https://github.com/flutter/flutter/issues
[Contributor Guide]: https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md
[Contributor Guide]: https://github.com/FirebaseExtended/flutterfire/blob/master/CONTRIBUTING.md
[Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[pub versioning philosophy]: https://www.dartlang.org/tools/pub/versioning
[CLA]: https://cla.developers.google.com/
10 changes: 6 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Contributing to FlutterFire

[![Build Status](https://api.cirrus-ci.com/github/flutter/plugins.svg)](https://cirrus-ci.com/github/FirebaseExtended/flutterfire/master)
[![Build Status](https://api.cirrus-ci.com/github/FirebaseExtended/flutterfire.svg)](https://cirrus-ci.com/github/FirebaseExtended/flutterfire/master)

_See also: [Flutter's code of conduct](https://flutter.io/design-principles/#code-of-conduct)_

## Things you will need


* Linux, Mac OS X, or Windows.
* git (used for source version control).
* An ssh client (used to authenticate with GitHub).
Expand All @@ -22,9 +21,9 @@ _See also: [Flutter's code of conduct](https://flutter.io/design-principles/#cod
* If you haven't configured your machine with an SSH key that's known to github, then
follow [GitHub's directions](https://help.github.com/articles/generating-ssh-keys/)
to generate an SSH key.
* `git clone git@github.com:<your_name_here>/plugins.git`
* `git clone git@github.com:<your_name_here>/flutterfire.git`
* `cd plugins`
* `git remote add upstream git@github.com:flutter/plugins.git` (So that you
* `git remote add upstream git@github.com:FirebaseExtended/flutterfire.git` (So that you
fetch from the master repository, not your clone, when running `git fetch`
et al.)

Expand Down Expand Up @@ -89,6 +88,9 @@ To send us a pull request:

Please make sure all your checkins have detailed commit messages explaining the patch.

For pull requests that affect only one Flutterfire plugin, use a title that starts
with the name of the plugin in brackets (e.g. [cloud_firestore]).

Plugins tests are run automatically on contributions using Cirrus CI. However, due to
cost constraints, pull requests from non-committers may not run all the tests
automatically.
Expand Down
43 changes: 21 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# FlutterFire

[![Build Status](https://api.cirrus-ci.com/github/flutter/plugins.svg)](https://cirrus-ci.com/github/FirebaseExtended/flutterfire/master)
[![Build Status](https://api.cirrus-ci.com/github/FirebaseExtended/flutterfire.svg)](https://cirrus-ci.com/github/FirebaseExtended/flutterfire/master)

FlutterFire is a set of [Flutter plugins](https://flutter.io/platform-plugins/)
that enable Flutter apps to use one or more [Firebase](https://firebase.google.com/) services. You can follow an example that shows how to use these plugins in the [Firebase for Flutter](https://codelabs.developers.google.com/codelabs/flutter-firebase/index.html#0) codelab.

[Flutter](https://flutter.io) is a new mobile app SDK to help developers and
designers build modern mobile apps for iOS and Android.
[Flutter](https://flutter.dev) is Google's mobile app SDK for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.

*Note*: The plugins are still under development, and some APIs might not be available yet.
[Feedback](https://github.com/flutter/flutter/issues) and [Pull Requests](https://github.com/flutter/plugins/pulls) are most welcome!
*Note*: FlutterFire plugins are still under development, and some APIs might not be available yet.
[Feedback](https://github.com/FirebaseExtended/flutterfire/issues) and [Pull Requests](https://github.com/FirebaseExtended/flutterfire/pulls) are most welcome!

## Available FlutterFire plugins

Expand All @@ -24,7 +23,7 @@ designers build modern mobile apps for iOS and Android.
| [firebase_crashlytics][crash_pub] | ![pub package][crash_badge] | [Firebase Crashlytics][crash_product] | [`packages/firebase_crashlytics`][crash_code] |
| [firebase_database][database_pub] | ![pub package][database_badge] | [Firebase Realtime Database][database_product] | [`packages/firebase_database`][database_code] |
| [firebase_dynamic_links][dynamic_links_pub] | ![pub package][dynamic_links_badge] | [Firebase Dynamic Links][dynamic_links_product] | [`packages/firebase_dynamic_links`][dynamic_links_code] |
| [in_app_messaging][in_app_messaging_pub] | ![pub package][in_app_messaging_badge] | [Firebase In-App Messaging][in_app_messaging_product] | [`packages/firebase_in_app_messaging`][in_app_messaging_code] |
| [firebase_in_app_messaging][in_app_messaging_pub] | ![pub package][in_app_messaging_badge] | [Firebase In-App Messaging][in_app_messaging_product] | [`packages/firebase_in_app_messaging`][in_app_messaging_code] |
| [firebase_messaging][messaging_pub] | ![pub package][messaging_badge] | [Firebase Cloud Messaging][messaging_product] | [`packages/firebase_messaging`][messaging_code] |
| [firebase_ml_vision][ml_vision_pub] | ![pub package][ml_vision_badge] | [Firebase ML Kit][ml_vision_product] | [`packages/firebase_ml_vision`][ml_vision_code] |
| [firebase_performance][performance_pub] | ![pub package][performance_badge] | [Firebase Performance Monitoring][performance_product] | [`packages/firebase_performance`][performance_code] |
Expand All @@ -33,77 +32,77 @@ designers build modern mobile apps for iOS and Android.

[admob_pub]: https://pub.dartlang.org/packages/firebase_admob
[admob_product]: https://firebase.google.com/docs/admob/
[admob_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_admob
[admob_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_admob
[admob_badge]: https://img.shields.io/pub/v/firebase_admob.svg

[analytics_pub]: https://pub.dartlang.org/packages/firebase_analytics
[analytics_product]: https://firebase.google.com/products/analytics/
[analytics_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_analytics
[analytics_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_analytics
[analytics_badge]: https://img.shields.io/pub/v/firebase_analytics.svg

[auth_pub]: https://pub.dartlang.org/packages/firebase_auth
[auth_product]: https://firebase.google.com/products/auth/
[auth_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_auth
[auth_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth
[auth_badge]: https://img.shields.io/pub/v/firebase_auth.svg

[core_pub]: https://pub.dartlang.org/packages/firebase_core
[core_product]: https://firebase.google.com/
[core_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_core
[core_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_core
[core_badge]: https://img.shields.io/pub/v/firebase_core.svg

[crash_pub]: https://pub.dartlang.org/packages/firebase_crashlytics
[crash_product]: https://firebase.google.com/products/crashlytics/
[crash_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_crashlytics
[crash_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_crashlytics
[crash_badge]: https://img.shields.io/pub/v/firebase_crashlytics.svg

[database_pub]: https://pub.dartlang.org/packages/firebase_database
[database_product]: https://firebase.google.com/products/database/
[database_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_database
[database_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_database
[database_badge]: https://img.shields.io/pub/v/firebase_database.svg

[dynamic_links_pub]: https://pub.dartlang.org/packages/firebase_dynamic_links
[dynamic_links_product]: https://firebase.google.com/products/dynamic-links/
[dynamic_links_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_dynamic_links
[dynamic_links_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_dynamic_links
[dynamic_links_badge]: https://img.shields.io/pub/v/firebase_dynamic_links.svg

[firestore_pub]: https://pub.dartlang.org/packages/cloud_firestore
[firestore_product]: https://firebase.google.com/products/firestore/
[firestore_code]: https://github.com/flutter/plugins/tree/master/packages/cloud_firestore
[firestore_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_firestore
[firestore_badge]: https://img.shields.io/pub/v/cloud_firestore.svg

[functions_pub]: https://pub.dartlang.org/packages/cloud_functions
[functions_product]: https://firebase.google.com/products/functions/
[functions_code]: https://github.com/flutter/plugins/tree/master/packages/cloud_functions
[functions_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_functions
[functions_badge]: https://img.shields.io/pub/v/cloud_functions.svg

[in_app_messaging_pub]: https://pub.dartlang.org/packages/firebase_in_app_messaging
[in_app_messaging_product]: https://firebase.google.com/products/in-app-messaging/
[in_app_messaging_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_in_app_messaging
[in_app_messaging_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_in_app_messaging
[in_app_messaging_badge]: https://img.shields.io/pub/v/firebase_in_app_messaging.svg

[messaging_pub]: https://pub.dartlang.org/packages/firebase_messaging
[messaging_product]: https://firebase.google.com/products/cloud-messaging/
[messaging_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_messaging
[messaging_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging
[messaging_badge]: https://img.shields.io/pub/v/firebase_messaging.svg

[ml_vision_pub]: https://pub.dartlang.org/packages/firebase_ml_vision
[ml_vision_product]: https://firebase.google.com/products/ml-kit/
[ml_vision_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_ml_vision
[ml_vision_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_ml_vision
[ml_vision_badge]: https://img.shields.io/pub/v/firebase_ml_vision.svg

[performance_pub]: https://pub.dartlang.org/packages/firebase_performance
[performance_product]: https://firebase.google.com/products/performance/
[performance_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_performance
[performance_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_performance
[performance_badge]: https://img.shields.io/pub/v/firebase_performance.svg

[remote_config_pub]: https://pub.dartlang.org/packages/firebase_remote_config
[remote_config_product]: https://firebase.google.com/products/remote-config/
[remote_config_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_remote_config
[remote_config_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_remote_config
[remote_config_badge]: https://img.shields.io/pub/v/firebase_remote_config.svg

[storage_pub]: https://pub.dartlang.org/packages/firebase_storage
[storage_product]: https://firebase.google.com/products/storage/
[storage_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_storage
[storage_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_storage
[storage_badge]: https://img.shields.io/pub/v/firebase_storage.svg

## Issues
Expand All @@ -115,6 +114,6 @@ Plugin issues that are not specific to Flutterfire can be filed in the [Flutter
## Contributing

If you wish to contribute a change to any of the existing plugins in this repo,
please review our [contribution guide](https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md),
please review our [contribution guide](https://github.com/FirebaseExtended/flutterfire/blob/master/CONTRIBUTING.md),
and send a [pull request](https://github.com/FirebaseExtended/flutterfire/pulls).

14 changes: 14 additions & 0 deletions packages/cloud_firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 0.12.9+3

* Updated error handling on Android for transactions to prevent crashes.

## 0.12.9+2

* Fix flaky integration test for `includeMetadataChanges`.

## 0.12.9+1

* Update documentation to reflect new repository location.
* Update unit tests to call `TestWidgetsFlutterBinding.ensureInitialized`.
* Remove executable bit on LICENSE file.

## 0.12.9

* New optional `includeMetadataChanges` parameter added to `DocumentReference.snapshots()`
Expand Down
Empty file modified packages/cloud_firestore/LICENSE
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions packages/cloud_firestore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ A Flutter plugin to use the [Cloud Firestore API](https://firebase.google.com/do

[![pub package](https://img.shields.io/pub/v/cloud_firestore.svg)](https://pub.dartlang.org/packages/cloud_firestore)

For Flutter plugins for other Firebase products, see [FlutterFire.md](https://github.com/flutter/plugins/blob/master/FlutterFire.md).
For Flutter plugins for other Firebase products, see [README.md](https://github.com/FirebaseExtended/flutterfire/blob/master/README.md).

*Note*: This plugin is still under development, and some APIs might not be available yet. [Feedback](https://github.com/flutter/flutter/issues) and [Pull Requests](https://github.com/flutter/plugins/pulls) are most welcome!
*Note*: This plugin is still under development, and some APIs might not be available yet. [Feedback](https://github.com/FirebaseExtended/flutterfire/issues) and [Pull Requests](https://github.com/FirebaseExtended/flutterfire/pulls) are most welcome!

## Setup

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public void run() {
result.success(snapshotMap);
}
});
} catch (final FirebaseFirestoreException e) {
} catch (final Exception e) {
activity.runOnUiThread(
new Runnable() {
@Override
Expand Down Expand Up @@ -506,7 +506,7 @@ public void run() {
result.success(null);
}
});
} catch (final IllegalStateException e) {
} catch (final Exception e) {
activity.runOnUiThread(
new Runnable() {
@Override
Expand All @@ -529,14 +529,24 @@ public void run() {
@Override
protected Void doInBackground(Void... voids) {
Map<String, Object> data = (Map<String, Object>) arguments.get("data");
transaction.set(getDocumentReference(arguments), data);
activity.runOnUiThread(
new Runnable() {
@Override
public void run() {
result.success(null);
}
});
try {
transaction.set(getDocumentReference(arguments), data);
activity.runOnUiThread(
new Runnable() {
@Override
public void run() {
result.success(null);
}
});
} catch (final Exception e) {
activity.runOnUiThread(
new Runnable() {
@Override
public void run() {
result.error("Error performing Transaction#set", e.getMessage(), null);
}
});
}
return null;
}
}.execute();
Expand All @@ -549,14 +559,24 @@ public void run() {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... voids) {
transaction.delete(getDocumentReference(arguments));
activity.runOnUiThread(
new Runnable() {
@Override
public void run() {
result.success(null);
}
});
try {
transaction.delete(getDocumentReference(arguments));
activity.runOnUiThread(
new Runnable() {
@Override
public void run() {
result.success(null);
}
});
} catch (final Exception e) {
activity.runOnUiThread(
new Runnable() {
@Override
public void run() {
result.error("Error performing Transaction#delete", e.getMessage(), null);
}
});
}
return null;
}
}.execute();
Expand Down
Loading

0 comments on commit 9ffb10d

Please sign in to comment.