@@ -29,17 +29,50 @@ post_install do |installer|
29
29
end
30
30
end
31
31
32
+ # Returns true if the user has explicitly requested local sources or if this is
33
+ # a non-PR Travis build.
34
+ def use_local_sources ( )
35
+ return ENV . has_key? ( 'USE_LOCAL_SOURCES' ) || ENV [ 'TRAVIS_PULL_REQUEST' ] == 'false'
36
+ end
37
+
38
+ # Adds a `pod name, :path => ../..` declaration to use local sources if the
39
+ # Podfile has been configured to operate that way.
40
+ def maybe_local_pod ( name )
41
+ if use_local_sources ( )
42
+ pod name , :path => '../..'
43
+ end
44
+ end
45
+
46
+ # Adds local pod declarations for all Firestore's transitive dependencies if
47
+ # required.
48
+ def configure_local_pods ( )
49
+ # Firestore is always local; that's what's under development here.
50
+ pod 'FirebaseFirestore' , :path => '../../'
51
+
52
+ # FirebaseCore must always be a local pod so that CI builds that make changes
53
+ # to its podspec can still function. See Firestore-*-xcodebuild in
54
+ # scripts/install_prereqs.sh for more details.
55
+ pod 'FirebaseCore' , :path => '../..'
56
+
57
+ # Pull in local sources conditionally.
58
+ maybe_local_pod 'FirebaseAuth'
59
+ maybe_local_pod 'FirebaseAuthInterop'
60
+ maybe_local_pod 'FirebaseCoreDiagnostics'
61
+ maybe_local_pod 'FirebaseCoreDiagnosticsInterop'
62
+ maybe_local_pod 'GoogleDataTransport'
63
+ maybe_local_pod 'GoogleDataTransportCCTSupport'
64
+ maybe_local_pod 'GoogleUtilities'
65
+ end
32
66
33
67
target 'Firestore_Example_iOS' do
34
68
platform :ios , '8.0'
35
69
36
70
# The next line is the forcing function for the Firebase pod. The Firebase
37
71
# version's subspecs should depend on the component versions in their
38
- # corresponding podspec's .
72
+ # corresponding podspecs .
39
73
pod 'Firebase/CoreOnly' , '6.7.0'
40
74
41
- pod 'FirebaseFirestore' , :path => '../../'
42
- pod 'FirebaseCore' , :path => '../../'
75
+ configure_local_pods ( )
43
76
44
77
target 'Firestore_Tests_iOS' do
45
78
inherit! :search_paths
86
119
target 'Firestore_Example_macOS' do
87
120
platform :osx , '10.11'
88
121
89
- pod 'FirebaseFirestore' , :path => '../../'
90
- pod 'FirebaseCore' , :path => '../../'
122
+ configure_local_pods ( )
91
123
92
124
target 'Firestore_Tests_macOS' do
93
125
inherit! :search_paths
116
148
target 'Firestore_Example_tvOS' do
117
149
platform :tvos , '10.0'
118
150
119
- pod 'FirebaseFirestore' , :path => '../../'
120
- pod 'FirebaseCore' , :path => '../../'
151
+ configure_local_pods ( )
121
152
122
153
target 'Firestore_Tests_tvOS' do
123
154
inherit! :search_paths
0 commit comments