-
Notifications
You must be signed in to change notification settings - Fork 4k
[firebase_core] v2 embedding API #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bparrishMines
merged 16 commits into
firebase:master
from
bparrishMines:firebase_core_embedding
Oct 22, 2019
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9f8bf53
Plugin side of new embedding
bparrishMines 550b2d9
Update example app to used embedding api
bparrishMines 3e73439
I always forget to format
bparrishMines 143b534
channel name constant no null check
bparrishMines 3a7f9cc
Use EmbeddingV1Activity and MainActivity names
bparrishMines ca2dee6
Use single class
bparrishMines daae697
Add embedding dependencies
bparrishMines 8df20bd
Add e2e test files
bparrishMines 9adecff
Get e2e tests to run and pass
bparrishMines 6bd56e8
Add meaningful tests
bparrishMines 1dd5150
Bump version
bparrishMines b925d3b
Set minimum version to latest stable
bparrishMines e51adab
fix gradle script
bparrishMines b5b9ba3
Review comments above ^^^
bparrishMines 93eb032
Javadocs
bparrishMines 60e761b
Formatting
bparrishMines File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
...id/app/src/androidTest/java/io/flutter/plugins/firebase/core/EmbeddingV1ActivityTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
package io.flutter.plugins.firebase.core; | ||
|
||
import androidx.test.rule.ActivityTestRule; | ||
import dev.flutter.plugins.e2e.FlutterRunner; | ||
import io.flutter.plugins.firebasecoreexample.EmbeddingV1Activity; | ||
import org.junit.Rule; | ||
import org.junit.runner.RunWith; | ||
|
||
@RunWith(FlutterRunner.class) | ||
public class EmbeddingV1ActivityTest { | ||
@Rule | ||
public ActivityTestRule<EmbeddingV1Activity> rule = | ||
new ActivityTestRule<>(EmbeddingV1Activity.class); | ||
} |
16 changes: 16 additions & 0 deletions
16
...e/android/app/src/androidTest/java/io/flutter/plugins/firebase/core/MainActivityTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
package io.flutter.plugins.firebase.core; | ||
|
||
import androidx.test.rule.ActivityTestRule; | ||
import dev.flutter.plugins.e2e.FlutterRunner; | ||
import io.flutter.plugins.firebasecoreexample.MainActivity; | ||
import org.junit.Rule; | ||
import org.junit.runner.RunWith; | ||
|
||
@RunWith(FlutterRunner.class) | ||
public class MainActivityTest { | ||
@Rule public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...android/app/src/main/java/io/flutter/plugins/firebasecoreexample/EmbeddingV1Activity.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.flutter.plugins.firebasecoreexample; | ||
|
||
import android.os.Bundle; | ||
import io.flutter.app.FlutterActivity; | ||
import io.flutter.plugins.GeneratedPluginRegistrant; | ||
|
||
public class EmbeddingV1Activity extends FlutterActivity { | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
GeneratedPluginRegistrant.registerWith(this); | ||
} | ||
} |
12 changes: 6 additions & 6 deletions
12
...xample/android/app/src/main/java/io/flutter/plugins/firebasecoreexample/MainActivity.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package io.flutter.plugins.firebasecoreexample; | ||
|
||
import android.os.Bundle; | ||
import io.flutter.app.FlutterActivity; | ||
import io.flutter.plugins.GeneratedPluginRegistrant; | ||
import io.flutter.embedding.android.FlutterActivity; | ||
import io.flutter.embedding.engine.FlutterEngine; | ||
import io.flutter.plugins.firebase.core.FirebaseCorePlugin; | ||
|
||
public class MainActivity extends FlutterActivity { | ||
// TODO(bparrishMines): Remove this once v2 of GeneratedPluginRegistrant rolls to stable. https://github.com/flutter/flutter/issues/42694 | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
GeneratedPluginRegistrant.registerWith(this); | ||
public void configureFlutterEngine(FlutterEngine flutterEngine) { | ||
flutterEngine.getPlugins().add(new FirebaseCorePlugin()); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
android.enableR8=true | ||
android.useAndroidX=true | ||
android.enableJetifier=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ description: Flutter plugin for Firebase Core, enabling connecting to multiple | |
Firebase apps. | ||
author: Flutter Team <[email protected]> | ||
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_core | ||
version: 0.4.0+9 | ||
version: 0.4.1 | ||
|
||
flutter: | ||
plugin: | ||
|
@@ -17,9 +17,12 @@ dependencies: | |
meta: "^1.0.5" | ||
|
||
dev_dependencies: | ||
e2e: ^0.2.1 | ||
flutter_driver: | ||
sdk: flutter | ||
flutter_test: | ||
sdk: flutter | ||
|
||
environment: | ||
sdk: ">=2.0.0-dev.28.0 <3.0.0" | ||
flutter: ">=1.5.0 <2.0.0" | ||
flutter: ">=1.9.1+hotfix.5 <2.0.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2019, the Chromium project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'package:firebase_core/firebase_core.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:e2e/e2e.dart'; | ||
|
||
void main() { | ||
E2EWidgetsFlutterBinding.ensureInitialized(); | ||
|
||
testWidgets('configure', (WidgetTester tester) async { | ||
await FirebaseApp.configure( | ||
name: 'foo', | ||
options: const FirebaseOptions( | ||
googleAppID: '1:297855924061:ios:c6de2b69b03a5be8', | ||
gcmSenderID: '297855924061', | ||
apiKey: 'AIzaSyBq6mcufFXfyqr79uELCiqM_O_1-G72PVU', | ||
), | ||
); | ||
|
||
final List<FirebaseApp> apps = await FirebaseApp.allApps(); | ||
expect(apps, hasLength(1)); | ||
|
||
final FirebaseOptions options = await apps[0].options; | ||
|
||
expect(options.apiKey, 'AIzaSyBq6mcufFXfyqr79uELCiqM_O_1-G72PVU'); | ||
expect(options.gcmSenderID, '297855924061'); | ||
expect(options.googleAppID, '1:297855924061:ios:c6de2b69b03a5be8'); | ||
}); | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.