Skip to content

Commit 55717f4

Browse files
authored
FirebaseSharedSwift CocoaPods (#9120)
1 parent 480178b commit 55717f4

File tree

12 files changed

+370
-10
lines changed

12 files changed

+370
-10
lines changed

.github/workflows/database.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
paths:
66
- 'FirebaseDatabase**'
77
- 'Firebase/Database/**'
8+
- 'FirebaseSharedSwift**'
89
- 'Example/Database/**'
910
- 'Interop/Auth/Public/*.h'
1011
- '.github/workflows/database.yml'

.github/workflows/functions.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
paths:
66
- 'FirebaseFunctions/**'
7+
- 'FirebaseSharedSwift**'
78
- '.github/workflows/functions.yml'
89
- 'Interop/Auth/Public/*.h'
910
- 'FirebaseMessaging/Sources/Interop/*.h'
@@ -26,6 +27,7 @@ jobs:
2627
strategy:
2728
matrix:
2829
target: [ios, tvos, macos, watchos]
30+
podspec: [ 'FirebaseFunctions.podspec', 'FirebaseFunctionsSwift.podspec']
2931
steps:
3032
- uses: actions/checkout@v2
3133
- name: Setup Bundler
@@ -34,8 +36,7 @@ jobs:
3436
run: FirebaseFunctions/Backend/start.sh synchronous
3537
- name: Build and test
3638
run: |
37-
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseFunctions.podspec \
38-
--platforms=${{ matrix.target }}
39+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }}
3940
4041
spm:
4142
# Don't run on private repo unless it is a PR.
@@ -67,7 +68,7 @@ jobs:
6768
runs-on: macos-11
6869
strategy:
6970
matrix:
70-
target: [tvOS, macOS, catalyst]
71+
target: [tvOS, macOS, catalyst, watchOS]
7172
steps:
7273
- uses: actions/checkout@v2
7374
- uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077

.github/workflows/shared-swift.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: shared-swift
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'FirebaseSharedSwift**'
7+
- 'Gemfile*'
8+
9+
schedule:
10+
# Run every day at 3am (PST) - cron uses UTC times
11+
- cron: '0 11 * * *'
12+
13+
jobs:
14+
15+
pod-lib-lint:
16+
# Don't run on private repo unless it is a PR.
17+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
18+
19+
runs-on: macos-11
20+
strategy:
21+
matrix:
22+
target: [ios, tvos, macos, watchos]
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Setup Bundler
26+
run: scripts/setup_bundler.sh
27+
- name: Build and test
28+
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSharedSwift.podspec --platforms=${{ matrix.target }}
29+
30+
spm:
31+
# Don't run on private repo unless it is a PR.
32+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
33+
runs-on: macos-11
34+
strategy:
35+
matrix:
36+
target: [iOS, tvOS, macOS, catalyst, watchOS]
37+
steps:
38+
- uses: actions/checkout@v2
39+
- uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
40+
with:
41+
cache_key: ${{ matrix.os }}
42+
- name: Initialize xcodebuild
43+
run: scripts/setup_spm_tests.sh
44+
- name: Unit Tests
45+
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSharedSwiftTests ${{ matrix.target }} spm

Dangerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ has_license_changes = didModify(["LICENSE"])
9292
@has_dynamiclinks_api_changes = hasChangesIn("FirebaseDynamicLinks/Sources/Public/")
9393
@has_firestore_changes = hasChangesIn(["Firestore/", "FirebaseFirestore.podspec"])
9494
@has_firestore_api_changes = hasChangesIn("Firestore/Source/Public/")
95-
@has_functions_changes = hasChangesIn(["FirebaseFunctions/", "FirebaseFunctions.podspec"])
95+
@has_functions_changes = hasChangesIn(["FirebaseFunctions"])
9696
@has_functions_api_changes = hasChangesIn("FirebaseFunctions/Sources/Public/")
9797
@has_inappmessaging_changes = hasChangesIn(["FirebaseInAppMessaging"])
9898
@has_inappmessaging_api_changes = hasChangesIn(["FirebaseInAppMessaging/Sources/Public/"])

FirebaseDatabaseSwift.podspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#
2-
# Be sure to run `pod lib lint FirebaseDatabaseSwift.podspec' to ensure this is a
3-
# valid spec before submitting.
4-
#
5-
61
Pod::Spec.new do |s|
72
s.name = 'FirebaseDatabaseSwift'
83
s.version = '8.10.0-beta'
@@ -34,4 +29,5 @@ Simplify your iOS development, grow your user base, and monetize more effectivel
3429
]
3530

3631
s.dependency 'FirebaseDatabase', '~> 8.0'
32+
s.dependency 'FirebaseSharedSwift', '~> 8.11'
3733
end

FirebaseDatabaseSwift/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 8.11.0-beta
2+
- Refactored Codable implementation to share common source with Firebase Functions. This should be
3+
generally transparent with the exception of custom decoder use cases which may need to be updated. (#8854)
4+
15
# 8.1.0-beta
26
- Initial public beta release for Swift Package Manager.
37

FirebaseFunctionsSwift.podspec

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'FirebaseFunctionsSwift'
3+
s.version = '8.11.0-beta'
4+
s.summary = 'Swift Extensions for Firebase Functions'
5+
6+
s.description = <<-DESC
7+
Swift SDK Extensions for Cloud Functions for Firebase.
8+
DESC
9+
10+
s.homepage = 'https://developers.google.com/'
11+
s.license = { :type => 'Apache', :file => 'LICENSE' }
12+
s.authors = 'Google, Inc.'
13+
14+
s.source = {
15+
:git => 'https://github.com/Firebase/firebase-ios-sdk.git',
16+
:tag => 'CocoaPods-' + s.version.to_s
17+
}
18+
19+
s.swift_version = '5.1'
20+
21+
ios_deployment_target = '10.0'
22+
osx_deployment_target = '10.12'
23+
tvos_deployment_target = '10.0'
24+
watchos_deployment_target = '6.0'
25+
26+
s.ios.deployment_target = ios_deployment_target
27+
s.osx.deployment_target = osx_deployment_target
28+
s.tvos.deployment_target = tvos_deployment_target
29+
s.watchos.deployment_target = watchos_deployment_target
30+
31+
s.cocoapods_version = '>= 1.4.0'
32+
s.prefix_header_file = false
33+
34+
s.source_files = [
35+
'FirebaseFunctionsSwift/Sources/**/*.swift',
36+
]
37+
38+
s.dependency 'FirebaseFunctions', '~> 8.10'
39+
s.dependency 'FirebaseSharedSwift', '~> 8.11'
40+
41+
s.test_spec 'integration' do |int_tests|
42+
int_tests.platforms = {
43+
:ios => ios_deployment_target,
44+
:osx => osx_deployment_target,
45+
:tvos => tvos_deployment_target
46+
}
47+
int_tests.source_files = 'FirebaseFunctionsSwift/Tests/*.swift'
48+
int_tests.dependency 'FirebaseFunctionsTestingSupport'
49+
end
50+
end

FirebaseFunctionsSwift/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 8.11.0-beta
2+
- Initial public beta release with Codable support. See example usage in
3+
https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseFunctionsSwift/Tests/IntegrationTests.swift. (#8854)

FirebaseSharedSwift.podspec

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'FirebaseSharedSwift'
3+
s.version = '8.11.0'
4+
s.summary = 'Shared Swift Extensions for Firebase'
5+
6+
s.description = <<-DESC
7+
This pod is for Firebase internal use and not supported for independent use.
8+
DESC
9+
10+
s.homepage = 'https://developers.google.com/'
11+
s.license = { :type => 'Apache', :file => 'FirebaseSharedSwift/LICENSE' }
12+
s.authors = 'Google, Inc.'
13+
14+
s.source = {
15+
:git => 'https://github.com/Firebase/firebase-ios-sdk.git',
16+
:tag => 'CocoaPods-' + s.version.to_s
17+
}
18+
19+
s.swift_version = '5.1'
20+
21+
ios_deployment_target = '10.0'
22+
osx_deployment_target = '10.12'
23+
tvos_deployment_target = '10.0'
24+
watchos_deployment_target = '6.0'
25+
26+
s.ios.deployment_target = ios_deployment_target
27+
s.osx.deployment_target = osx_deployment_target
28+
s.tvos.deployment_target = tvos_deployment_target
29+
s.watchos.deployment_target = watchos_deployment_target
30+
31+
s.cocoapods_version = '>= 1.4.0'
32+
s.prefix_header_file = false
33+
34+
s.source_files = [
35+
'FirebaseSharedSwift/Sources/**/*.swift',
36+
]
37+
38+
s.test_spec 'unit' do |unit_tests|
39+
unit_tests.scheme = { :code_coverage => true }
40+
unit_tests.platforms = {
41+
:ios => ios_deployment_target,
42+
:osx => osx_deployment_target,
43+
:tvos => tvos_deployment_target
44+
}
45+
unit_tests.source_files = 'FirebaseSharedSwift/Tests/**/*.swift'
46+
end
47+
end

0 commit comments

Comments
 (0)