-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[extension_google_sign_in_as_googleapis_auth] Update example app. #466
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
[extension_google_sign_in_as_googleapis_auth] Update example app. #466
Conversation
@stuartmorgan I've copied a bunch of test-like stuff from the google_sign_in example from flutter/plugins, but I'm not sure if it's 100% appropriate (especially the I have verified that the app now builds on Android again, but it seems to lack the client ID to correctly use the Auth service. I'm not sure if tests run correctly (I hope something happens in this run!) |
bd86712
to
44ca4b5
Compare
(Force-pushed after fixing conflicts on a rebase with master) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started doing a file-by-file review, but it seems like there's a lot here that's not relevant.
What about just nuking example
, regenerating it from the template, and re-adding the Dart bits?
packages/extension_google_sign_in_as_googleapis_auth/example/android/app/build.gradle
Outdated
Show resolved
Hide resolved
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.TYPE) | ||
public @interface DartIntegrationTest {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not running this file at all in this repo. Do we actually need native integration tests for this package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a result of doing a cp from the current implementation of the example app of google_sign_in into here. I thought you were looking at adding Android tests for this repo? I can remove these tests, no problem (there's probably the xcode equivalents somewhere under the ios dir?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can run whatever tests in the repo that we believe are useful, but generally I wouldn't expect a non-plugin package to need to run native tests. Presumably this package is testable by shimming out the plugin it wraps, and doing Dart unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there are a couple of unit-tests in the root test directory that are enough (the behavior is very simple).
I think the most valuable thing to do here would be to say: this example app passes the same integration tests as google_sign_in, in an attempt to prove they're functionally identical?
(The only change actually is that this example app uses package:googleapis
and the standard app uses raw http requests with hand-coded authentication headers)
...oid/app/src/androidTest/java/io/flutter/plugins/googlesigninexample/FlutterActivityTest.java
Outdated
Show resolved
Hide resolved
...ndroid/app/src/androidTest/java/io/flutter/plugins/googlesigninexample/GoogleSignInTest.java
Outdated
Show resolved
Hide resolved
Yep, this is better. I'll get this done. |
@stuartmorgan I completely nuked
The only modifications I did were to I added the plist file in the right spot on the ios code (inside the Runner), but I did it manually, so I'm sure it's missing some xcode magic :/ PTAL! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits.
Some of the added churn here is because you didn't use --ios-language=objc --android-language=java
, but for an example in the packages repo I think it probably doesn't matter. (In plugins we want the example runners to use the same language as everything else, at least for now.)
packages/extension_google_sign_in_as_googleapis_auth/example/pubspec.yaml
Outdated
Show resolved
Hide resolved
packages/extension_google_sign_in_as_googleapis_auth/example/pubspec.yaml
Outdated
Show resolved
Hide resolved
packages/extension_google_sign_in_as_googleapis_auth/example/test/widget_test.dart
Outdated
Show resolved
Hide resolved
...h/example/android/app/src/main/kotlin/io/flutter/plugins/googlesigninexample/MainActivity.kt
Outdated
Show resolved
Hide resolved
This is a good point, I'll get it done before merging, see if it simplifies things :) |
Ready to go! |
Update the example app of
package:extension_google_sign_in_as_googleapis_auth
by grabbing the latest version of theexample
app frompackage:google_sign_in
and applying the changes required for this package to work.The example app builds again on Android (at least on an emulator, it starts up!)
Fixes flutter/flutter#89301
Pre-launch Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy.CHANGELOG.md
to add a description of the change.///
).If you need help, consider asking for advice on the
#hackers-new
channel on Discord.