Skip to content

Commit

Permalink
[v9] Reorganize FirebaseCore* modules (#9482)
Browse files Browse the repository at this point in the history
* [skip ci] [will revert] Add debug printing to `pod_lib_lint.rb`

* Reorganize FirebaseCore libraries for SPM and CP

* [skip ci] Revert "[skip ci] [will revert] Add debug printing to `pod_lib_lint.rb`"

This reverts commit 2a837e3.

* Review and fix CI

* Remove `heartbeat_logging.yml` and add `core_internal.yml`

* Remove trailing whitespace

* Fix more whitespace 😞

* Fix `core_internal.yml` scheme name

* Update `check_imports.swift` and TODO

* Review

* Add FirebaseCoreInternal pod to Firestore example's Podfile

* [skip ci] Review - remove TODOs

* [skip ci] Remove duplicate `XCTest` import
  • Loading branch information
ncooke3 authored and paulb777 committed Mar 23, 2022
1 parent e002709 commit a09083f
Show file tree
Hide file tree
Showing 266 changed files with 562 additions and 379 deletions.
1 change: 0 additions & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
paths:
- 'FirebaseCore**'
- 'Interop/CoreDiagnostics/Public/*.h'
- 'HeartbeatLogging**'
- '.github/workflows/core.yml'
- 'Gemfile*'
schedule:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/core_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: core_extension

on:
pull_request:
paths:
- 'FirebaseCoreExtension.podspec'
- 'FirebaseCore/Extension/**'
- '.github/workflows/core_extension.yml'
- 'Gemfile*'
schedule:
# Run every day at 2am (PST) - cron uses UTC times
- cron: '0 10 * * *'

jobs:
# Since `FirebaseCoreExtension` only contains headers, linting is sufficient for testing.

pod-lib-lint:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
runs-on: macos-11
strategy:
matrix:
target: [ios, tvos, macos]
env:
POD_LIB_LINT_ONLY: 1
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Build and test
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreExtension.podspec --platforms=${{ matrix.target }}

core-internal-cron-only:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
runs-on: macos-11
strategy:
matrix:
target: [ios, tvos, macos]
flags: [
'--use-static-frameworks'
]
needs: pod-lib-lint
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: PodLibLint CoreInternal Cron
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreExtension.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
79 changes: 79 additions & 0 deletions .github/workflows/core_internal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: core_internal

on:
pull_request:
paths:
- 'FirebaseCoreInternal.podspec'
- 'FirebaseCore/Internal/**'
- '.github/workflows/core_internal.yml'
- 'Gemfile*'
schedule:
# Run every day at 2am (PST) - cron uses UTC times
- cron: '0 10 * * *'

jobs:
pod-lib-lint:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
runs-on: macos-11
strategy:
matrix:
target: [ios, tvos, macos]
env:
POD_LIB_LINT_ONLY: 1
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Build and test
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }}

spm:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
runs-on: macos-11
strategy:
matrix:
target: [iOS, tvOS, macOS, catalyst, watchOS]
steps:
- uses: actions/checkout@v2
- name: Initialize xcodebuild
run: scripts/setup_spm_tests.sh
- name: FirebaseCoreInternalTests
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseCoreInternalTests ${{ matrix.target }} spm

catalyst:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
runs-on: macos-11
env:
POD_LIB_LINT_ONLY: 1
steps:
- uses: actions/checkout@v2
- uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
with:
cache_key: ${{ matrix.os }}
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Setup Catalyst project and run unit tests
run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Unit
- name: Setup Catalyst project and run integration tests
run: scripts/test_catalyst.sh FirebaseCoreInternal test FirebaseCoreInternal-Unit-Integration

core-internal-cron-only:
# Don't run on private repo.
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
runs-on: macos-11
strategy:
matrix:
target: [ios, tvos, macos]
flags: [
'--use-static-frameworks'
]
needs: pod-lib-lint
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: PodLibLint CoreInternal Cron
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreInternal.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
28 changes: 0 additions & 28 deletions .github/workflows/heartbeat_logging.yml

This file was deleted.

1 change: 1 addition & 0 deletions CoreOnly/Tests/FirebasePodTest/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ target 'FirebasePodTest' do
pod 'FirebaseMessagingInterop', :path => '../../../'
pod 'FirebaseCoreDiagnostics', :path => '../../../'
pod 'FirebaseCoreInternal', :path => '../../../'
pod 'FirebaseCoreExtension', :path => '../../../'

pod 'FirebaseAnalytics' # Analytics is not open source
end
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#import "FBLPromises.h"
#endif

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

#import "Crashlytics/Crashlytics/FIRCLSUserDefaults/FIRCLSUserDefaults.h"

Expand Down
2 changes: 1 addition & 1 deletion Crashlytics/Crashlytics/FIRCrashlytics.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#import "Crashlytics/Crashlytics/Controllers/FIRCLSReportManager.h"
#import "Crashlytics/Crashlytics/Controllers/FIRCLSReportUploader.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
#import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
#import "Interop/Analytics/Public/FIRAnalyticsInterop.h"

Expand Down
2 changes: 1 addition & 1 deletion Crashlytics/Crashlytics/Helpers/FIRCLSLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#import "Crashlytics/Crashlytics/Helpers/FIRCLSLogger.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

FIRLoggerService kFIRLoggerCrashlytics = @"[Firebase/Crashlytics]";

Expand Down
2 changes: 1 addition & 1 deletion Crashlytics/Shared/FIRCLSConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#import "Crashlytics/Shared/FIRCLSConstants.h"
#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
Expand Down
2 changes: 1 addition & 1 deletion Crashlytics/UnitTests/FIRCLSConstantsTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#import <XCTest/XCTest.h>

#import "Crashlytics/Shared/FIRCLSConstants.h"
#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
Expand Down
2 changes: 1 addition & 1 deletion Crashlytics/UnitTests/FIRCLSMetricKitManagerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#import <XCTest/XCTest.h>

#import "Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.h"
#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

#if CLS_METRICKIT_SUPPORTED

Expand Down
2 changes: 1 addition & 1 deletion Crashlytics/UnitTests/FIRCLSReportManagerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

#if __has_include(<FBLPromises/FBLPromises.h>)
#import <FBLPromises/FBLPromises.h>
Expand Down
2 changes: 1 addition & 1 deletion Crashlytics/UnitTests/Mocks/FIRAppFake.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

@interface FIRAppFake : NSObject

Expand Down
1 change: 1 addition & 0 deletions Example/watchOSSample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ target 'SampleWatchAppWatchKitExtension' do

pod 'FirebaseCore', :path => '../../'
pod 'FirebaseMessaging', :path => '../../'
pod 'FirebaseCoreInternal', :path => '../../'
pod 'FirebaseCoreDiagnostics', :path => '../../'
pod 'FirebaseInstallations', :path => '../../'
pod 'FirebaseStorage', :path => '../../'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import "FirebaseABTesting/Sources/ABTConstants.h"
#import "FirebaseABTesting/Sources/Public/FirebaseABTesting/FIRLifecycleEvents.h"
#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
#import "Interop/Analytics/Public/FIRAnalyticsInterop.h"

@implementation ABTConditionalUserPropertyController {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseABTesting/Sources/ABTConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#import <Foundation/Foundation.h>
#import "FirebaseCore/Internal/FIRLogger.h"
#import "FirebaseCore/Extension/FIRLogger.h"

#define ABT_MSEC_PER_SEC 1000ull

Expand Down
2 changes: 1 addition & 1 deletion FirebaseABTesting/Sources/FIRExperimentController.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#import "FirebaseABTesting/Sources/ABTConstants.h"
#import "FirebaseABTesting/Sources/Private/ABTExperimentPayload.h"
#import "FirebaseABTesting/Sources/Public/FirebaseABTesting/FIRLifecycleEvents.h"
#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

#import "Interop/Analytics/Public/FIRAnalyticsInterop.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#import "FirebaseABTesting/Tests/Unit/ABTFakeFIRAConditionalUserPropertyController.h"
#import "FirebaseABTesting/Tests/Unit/ABTTestUniversalConstants.h"
#import "FirebaseABTesting/Tests/Unit/Utilities/ABTTestUtilities.h"
#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

@interface ABTConditionalUserPropertyController (ExposedForTest)
- (NSInteger)maxNumberOfExperimentsOfOrigin:(NSString *)origin;
Expand Down
2 changes: 1 addition & 1 deletion FirebaseABTesting/Tests/Unit/FIRExperimentControllerTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#import "FirebaseABTesting/Tests/Unit/ABTFakeFIRAConditionalUserPropertyController.h"
#import "FirebaseABTesting/Tests/Unit/ABTTestUniversalConstants.h"
#import "FirebaseABTesting/Tests/Unit/Utilities/ABTTestUtilities.h"
#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
#import "Interop/Analytics/Public/FIRAnalyticsInterop.h"

extern ABTExperimentPayload *ABTDeserializeExperimentPayload(NSData *payload);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#import "FirebaseAppCheck/Sources/Core/Errors/FIRAppCheckErrorUtil.h"
#import "FirebaseAppCheck/Sources/Core/Errors/FIRAppCheckHTTPError.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#import "FirebaseAppCheck/Sources/Core/Errors/FIRAppCheckErrorUtil.h"
#import "FirebaseAppCheck/Sources/Core/FIRAppCheckLogger.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

#import <GoogleUtilities/GULURLSessionDataResponse.h>
#import <GoogleUtilities/NSURLSession+GULPromises.h>
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAppCheck/Sources/Core/FIRAppCheck.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#import "FirebaseAppCheck/Interop/FIRAppCheckInterop.h"
#import "FirebaseAppCheck/Interop/FIRAppCheckTokenResultInterop.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion FirebaseAppCheck/Sources/Core/FIRAppCheckLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import <Foundation/Foundation.h>

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

extern FIRLoggerService kFIRLoggerAppCheck;

Expand Down
2 changes: 1 addition & 1 deletion FirebaseAppCheck/Sources/Core/FIRAppCheckLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import "FirebaseAppCheck/Sources/Core/FIRAppCheckLogger.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion FirebaseAppCheck/Sources/Core/FIRAppCheckSettings.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import "FirebaseAppCheck/Sources/Core/FIRAppCheckSettings.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion FirebaseAppCheck/Sources/Core/FIRAppCheckValidator.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import "FirebaseAppCheck/Sources/Core/FIRAppCheckValidator.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

@implementation FIRAppCheckValidator

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#import "FirebaseAppCheck/Sources/Core/Errors/FIRAppCheckErrorUtil.h"
#import "FirebaseAppCheck/Sources/Core/FIRAppCheckLogger.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#import "FirebaseAppCheck/Sources/DebugProvider/API/FIRAppCheckDebugProviderAPIService.h"
#import "FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckToken.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#import "FirebaseAppCheck/Sources/Core/Errors/FIRAppCheckErrorUtil.h"
#import "FirebaseAppCheck/Sources/Core/FIRAppCheckLogger.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#import "FirebaseAppCheck/Sources/DeviceCheckProvider/DCDevice+FIRDeviceCheckTokenGenerator.h"
#import "FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckToken.h"

#import "FirebaseCore/Internal/FirebaseCoreInternal.h"
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Loading

0 comments on commit a09083f

Please sign in to comment.