Skip to content

Commit 747eac2

Browse files
authored
Separate GoogleUtilities Carthage build (#10250)
1 parent f804aba commit 747eac2

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public let shared = Manifest(
2424
version: "9.6.0",
2525
pods: [
2626
Pod("FirebaseSharedSwift"),
27-
Pod("FirebaseCoreDiagnostics"),
2827
Pod("FirebaseCoreInternal"),
2928
Pod("FirebaseCore"),
3029
Pod("FirebaseCoreExtension"),

ReleaseTooling/Sources/ZipBuilder/CarthageUtils.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ extension CarthageUtils {
7272
/// - packagedDir: The packaged directory assembled for the Carthage distribution.
7373
/// - templateDir: The template project directory, contains the dummy Firebase library.
7474
/// - jsonDir: Location of directory containing all JSON Carthage manifests.
75-
/// - firebaseVersion: The version of the Firebase pod.
76-
/// - coreDiagnosticsPath: The path to the Core Diagnostics framework built for Carthage.
75+
/// - artifacts: Build artifacts.
7776
/// - outputDir: The directory where all artifacts should be created.
77+
/// - versionCheckEnabled: Checking if Carthage version already exists.
7878

7979
private static func generateCarthageRelease(fromPackagedDir packagedDir: URL,
8080
templateDir: URL,

ReleaseTooling/Sources/ZipBuilder/CocoaPodUtils.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ enum CocoaPodUtils {
530530
let podspecs = try! FileManager.default.contentsOfDirectory(atPath: localURL.path)
531531
for podspec in podspecs {
532532
if podspec == "FirebaseInstallations.podspec" ||
533-
podspec == "FirebaseCoreDiagnostics.podspec" ||
534533
podspec == "FirebaseCore.podspec" ||
535534
podspec == "FirebaseCoreExtension.podspec" ||
536535
podspec == "FirebaseCoreInternal.podspec" ||

ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ struct FrameworkBuilder {
147147
/// Build all thin slices for an open source pod.
148148
/// - Parameter framework: The name of the framework to be built.
149149
/// - Parameter logsDir: The path to the directory to place build logs.
150-
/// - Parameter setCarthage: Set Carthage flag in CoreDiagnostics for metrics.
150+
/// - Parameter setCarthage: Set Carthage flag in GoogleUtilities for metrics.
151151
/// - Returns: A dictionary of URLs to the built thin libraries keyed by platform.
152152
private func buildFrameworksForAllPlatforms(withName framework: String,
153153
logsDir: URL,
@@ -173,7 +173,7 @@ struct FrameworkBuilder {
173173
/// - targetPlatform: The target platform to target for the build.
174174
/// - buildDir: Location where the project should be built.
175175
/// - logRoot: Root directory where all logs should be written.
176-
/// - setCarthage: Set Carthage flag in CoreDiagnostics for metrics.
176+
/// - setCarthage: Set Carthage flag in GoogleUtilities for metrics.
177177
/// - Returns: A URL to the framework that was built.
178178
private func buildSlicedFramework(withName framework: String,
179179
targetPlatform: TargetPlatform,

ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ struct ZipBuilder {
179179
// the folders in each product directory.
180180
let linkage: CocoaPodUtils.LinkageType = dynamicFrameworks ? .dynamic : .standardStatic
181181
var groupedFrameworks: [String: [URL]] = [:]
182-
var carthageCoreDiagnosticsFrameworks: [URL] = []
182+
var carthageGoogleUtilitiesFrameworks: [URL] = []
183183
var podsBuilt: [String: CocoaPodUtils.PodInfo] = [:]
184184
var xcframeworks: [String: [URL]] = [:]
185185
var resources: [String: URL] = [:]
@@ -241,13 +241,13 @@ struct ZipBuilder {
241241
podInfo: podInfo)
242242
groupedFrameworks[podName] = (groupedFrameworks[podName] ?? []) + frameworks
243243

244-
if includeCarthage, podName == "FirebaseCoreDiagnostics" {
244+
if includeCarthage, podName == "GoogleUtilities" {
245245
let (cdFrameworks, _) = builder.compileFrameworkAndResources(withName: podName,
246246
logsOutputDir: paths
247247
.logsOutputDir,
248248
setCarthage: true,
249249
podInfo: podInfo)
250-
carthageCoreDiagnosticsFrameworks += cdFrameworks
250+
carthageGoogleUtilitiesFrameworks += cdFrameworks
251251
}
252252
if resourceContents != nil {
253253
resources[podName] = resourceContents
@@ -299,13 +299,13 @@ struct ZipBuilder {
299299
fatalError("Could not create XCFrameworks Carthage directory: \(error)")
300300
}
301301

302-
let carthageCoreDiagnosticsXcframework = FrameworkBuilder.makeXCFramework(
303-
withName: "FirebaseCoreDiagnostics",
304-
frameworks: carthageCoreDiagnosticsFrameworks,
302+
let carthageGoogleUtilitiesXcframework = FrameworkBuilder.makeXCFramework(
303+
withName: "GoogleUtilities",
304+
frameworks: carthageGoogleUtilitiesFrameworks,
305305
xcframeworksDir: xcframeworksCarthageDir,
306306
resourceContents: nil
307307
)
308-
return (podsBuilt, xcframeworks, carthageCoreDiagnosticsXcframework)
308+
return (podsBuilt, xcframeworks, carthageGoogleUtilitiesXcframework)
309309
}
310310

311311
/// Try to build and package the contents of the Zip file. This will throw an error as soon as it
@@ -333,7 +333,7 @@ struct ZipBuilder {
333333
platforms: ["ios"]))
334334

335335
print("Final expected versions for the Zip file: \(podsToInstall)")
336-
let (installedPods, frameworks, carthageCoreDiagnosticsXcframeworkFirebase) =
336+
let (installedPods, frameworks, carthageGoogleUtilitiesXcframeworkFirebase) =
337337
buildAndAssembleZip(podsToInstall: podsToInstall,
338338
includeCarthage: true,
339339
// Always include dependencies for Firebase zips.
@@ -346,8 +346,8 @@ struct ZipBuilder {
346346
"installed: \(installedPods)")
347347
}
348348

349-
guard let carthageCoreDiagnosticsXcframework = carthageCoreDiagnosticsXcframeworkFirebase else {
350-
fatalError("CoreDiagnosticsXcframework is missing")
349+
guard let carthageGoogleUtilitiesXcframework = carthageGoogleUtilitiesXcframeworkFirebase else {
350+
fatalError("GoogleUtilitiesXcframework is missing")
351351
}
352352

353353
let zipDir = try assembleDistributions(withPackageKind: "Firebase",
@@ -357,7 +357,7 @@ struct ZipBuilder {
357357
firebasePod: firebasePod)
358358
// Replace Core Diagnostics
359359
var carthageFrameworks = frameworks
360-
carthageFrameworks["FirebaseCoreDiagnostics"] = [carthageCoreDiagnosticsXcframework]
360+
carthageFrameworks["GoogleUtilities"] = [carthageGoogleUtilitiesXcframework]
361361
let carthageDir = try assembleDistributions(withPackageKind: "CarthageFirebase",
362362
podsToInstall: podsToInstall,
363363
installedPods: installedPods,

0 commit comments

Comments
 (0)