Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
google_sign_in.Test module
  • Loading branch information
jmagman committed Jul 19, 2021
commit 6d48338d141fc1cc3ca16776b60e31a6c237b380
4 changes: 2 additions & 2 deletions packages/google_sign_in/google_sign_in/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## NEXT
## 5.0.5

* Add iOS unit and UI integration test targets.
* Add iOS unit tests.
* Add iOS unit test module map.
* Exclude arm64 simulators in example app.

## 5.0.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

@import XCTest;
@import google_sign_in;
@import google_sign_in.Test;
@import GoogleSignIn;

// OCMock library doesn't generate a valid modulemap.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
framework module google_sign_in {
umbrella header "google_sign_in-umbrella.h"

export *
module * { export * }

explicit module Test {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a private module since there are some complications for Swift files not being able to import those.

Instead, this explicit module requires that google_sign_in.Test be imported to access FLTGoogleSignInPlugin_Test. So initWithSignIn: won't be available in the normal import google_sign_in case, won't auto-complete, etc.

header "FLTGoogleSignInPlugin_Test.h"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This header is available in the Test module. Import via "@import google_sign_in.Test;"

#import <google_sign_in/FLTGoogleSignInPlugin.h>

@class GIDSignIn;

/// Methods exposed for unit testing.
@interface FLTGoogleSignInPlugin ()

/// Inject @c GIDSignIn for testing.
- (instancetype)initWithSignIn:(GIDSignIn *)signIn NS_DESIGNATED_INITIALIZER;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file was previously generated by CocoaPods with the same name. Now we need to manage it manually and check it into the repo because we're defining a module map, which takes us out of the magical auto module world.

// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import <Foundation/Foundation.h>

#import <google_sign_in/FLTGoogleSignInPlugin.h>

FOUNDATION_EXPORT double google_sign_inVersionNumber;
FOUNDATION_EXPORT const unsigned char google_sign_inVersionString[];
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Enables Google Sign-In in Flutter apps.
s.license = { :type => 'BSD', :file => '../LICENSE' }
s.author = { 'Flutter Team' => '[email protected]' }
s.source = { :http => 'https://github.com/flutter/plugins/tree/master/packages/google_sign_in' }
s.source_files = 'Classes/**/*'
s.source_files = 'Classes/**/*.{h,m}'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modulemap shouldn't be included in the source files.

s.public_header_files = 'Classes/**/*.h'
s.module_map = 'Classes/FLTGoogleSignInPlugin.modulemap'
s.dependency 'Flutter'
s.dependency 'GoogleSignIn', '~> 5.0'
s.static_framework = true
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 @@ -3,7 +3,7 @@ description: Flutter plugin for Google Sign-In, a secure authentication system
for signing in with a Google account on Android and iOS.
repository: https://github.com/flutter/plugins/tree/master/packages/google_sign_in/google_sign_in
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22
version: 5.0.4
version: 5.0.5
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuartmorgan with the module change this seems different enough to warrant a patch bump.


environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down