@@ -111,13 +111,11 @@ struct ModuleMapBuilder {
111
111
/// Build the module map files for the source frameworks.
112
112
///
113
113
func build( ) {
114
- for (_, info) in installedPods {
115
- if info. isSourcePod == false ||
116
- info. transitiveFrameworks != nil ||
117
- info. versionedPod. name == " Firebase " {
118
- continue
119
- }
120
- generate ( framework: info)
114
+ for framework in installedPods. values
115
+ where framework. isSourcePod &&
116
+ framework. versionedPod. name != " Firebase " &&
117
+ framework. transitiveFrameworks == nil {
118
+ generate ( framework: framework)
121
119
}
122
120
}
123
121
@@ -129,12 +127,14 @@ struct ModuleMapBuilder {
129
127
private func generate( framework: FrameworkInfo ) {
130
128
let podName = framework. versionedPod. name
131
129
let deps = CocoaPodUtils . transitiveVersionedPodDependencies ( for: podName, in: allPods)
132
- _ = CocoaPodUtils . installPods ( allSubspecList ( framework: framework) + deps,
133
- inDir: projectDir,
134
- platform: platform,
135
- customSpecRepos: customSpecRepos,
136
- localPodspecPath: localPodspecPath,
137
- linkage: . forcedStatic)
130
+
131
+ CocoaPodUtils . installPods ( allSubspecList ( framework: framework) + deps,
132
+ inDir: projectDir,
133
+ platform: platform,
134
+ customSpecRepos: customSpecRepos,
135
+ localPodspecPath: localPodspecPath,
136
+ linkage: . forcedStatic)
137
+
138
138
let xcconfigFile = projectDir. appendingPathComponents ( [ " Pods " , " Target Support Files " ,
139
139
" Pods-FrameworkMaker " ,
140
140
" Pods-FrameworkMaker.release.xcconfig " ] )
@@ -146,15 +146,14 @@ struct ModuleMapBuilder {
146
146
private func allSubspecList( framework: FrameworkInfo ) -> [ CocoaPodUtils . VersionedPod ] {
147
147
let name = framework. versionedPod. name
148
148
let version = framework. versionedPod. version
149
- let subspecs = framework . subspecs
150
- if subspecs. count == 0 {
151
- return [ CocoaPodUtils . VersionedPod ( name: " \( name) " , version: version) ]
149
+
150
+ guard framework . subspecs. count > 0 else {
151
+ return [ CocoaPodUtils . VersionedPod ( name: name, version: version) ]
152
152
}
153
- var list : [ CocoaPodUtils . VersionedPod ] = [ ]
154
- for subspec in framework. subspecs {
155
- list . append ( CocoaPodUtils . VersionedPod ( name: " \( name) / \( subspec) " , version: version) )
153
+
154
+ return framework. subspecs. map { subspec in
155
+ CocoaPodUtils . VersionedPod ( name: " \( name) / \( subspec) " , version: version)
156
156
}
157
- return list
158
157
}
159
158
160
159
// Extract the framework and library dependencies for a framework from
0 commit comments