@@ -555,61 +555,7 @@ let package = Package(
555555 ] ,
556556 path: " FirebaseCombineSwift/Sources/Storage "
557557 ) ,
558- . target(
559- name: " FirebaseCrashlytics " ,
560- dependencies: [
561- " FirebaseCore " ,
562- " FirebaseInstallations " ,
563- " FirebaseSessions " ,
564- " FirebaseRemoteConfigInterop " ,
565- " FirebaseCrashlyticsSwift " ,
566- . product( name: " GoogleDataTransport " , package : " GoogleDataTransport " ) ,
567- . product( name: " GULEnvironment " , package : " GoogleUtilities " ) ,
568- . product( name: " FBLPromises " , package : " Promises " ) ,
569- . product( name: " nanopb " , package : " nanopb " ) ,
570- ] ,
571- path: " Crashlytics " ,
572- exclude: [
573- " run " ,
574- " CHANGELOG.md " ,
575- " LICENSE " ,
576- " README.md " ,
577- " ProtoSupport/ " ,
578- " UnitTests/ " ,
579- " generate_project.sh " ,
580- " upload-symbols " ,
581- " CrashlyticsInputFiles.xcfilelist " ,
582- " third_party/libunwind/LICENSE " ,
583- " Crashlytics/Rollouts/ " ,
584- ] ,
585- sources: [
586- " Crashlytics/ " ,
587- " Protogen/ " ,
588- " Shared/ " ,
589- " third_party/libunwind/dwarf.h " ,
590- ] ,
591- resources: [ . process( " Resources/PrivacyInfo.xcprivacy " ) ] ,
592- publicHeadersPath: " Crashlytics/Public " ,
593- cSettings: [
594- . headerSearchPath( " .. " ) ,
595- . define( " DISPLAY_VERSION " , to: firebaseVersion) ,
596- . define( " CLS_SDK_NAME " , to: " Crashlytics iOS SDK " , . when( platforms: [ . iOS] ) ) ,
597- . define(
598- " CLS_SDK_NAME " ,
599- to: " Crashlytics macOS SDK " ,
600- . when( platforms: [ . macOS, . macCatalyst] )
601- ) ,
602- . define( " CLS_SDK_NAME " , to: " Crashlytics tvOS SDK " , . when( platforms: [ . tvOS] ) ) ,
603- . define( " CLS_SDK_NAME " , to: " Crashlytics watchOS SDK " , . when( platforms: [ . watchOS] ) ) ,
604- . define( " PB_FIELD_32BIT " , to: " 1 " ) ,
605- . define( " PB_NO_PACKED_STRUCTS " , to: " 1 " ) ,
606- . define( " PB_ENABLE_MALLOC " , to: " 1 " ) ,
607- ] ,
608- linkerSettings: [
609- . linkedFramework( " Security " ) ,
610- . linkedFramework( " SystemConfiguration " , . when( platforms: [ . iOS, . macOS, . tvOS] ) ) ,
611- ]
612- ) ,
558+ firebaseCrashlyticsTarget ( ) ,
613559 . target(
614560 name: " FirebaseCrashlyticsSwift " ,
615561 dependencies: [ " FirebaseRemoteConfigInterop " ] ,
@@ -1402,6 +1348,69 @@ let package = Package(
14021348
14031349// MARK: - Helper Functions
14041350
1351+ func firebaseCrashlyticsTarget( ) -> Target {
1352+ var cSettings : [ CSetting ] = [
1353+ . headerSearchPath( " .. " ) ,
1354+ . define( " DISPLAY_VERSION " , to: firebaseVersion) ,
1355+ . define( " CLS_SDK_NAME " , to: " Crashlytics iOS SDK " , . when( platforms: [ . iOS] ) ) ,
1356+ . define(
1357+ " CLS_SDK_NAME " , to: " Crashlytics macOS SDK " ,
1358+ . when( platforms: [ . macOS, . macCatalyst] )
1359+ ) ,
1360+ . define( " CLS_SDK_NAME " , to: " Crashlytics tvOS SDK " , . when( platforms: [ . tvOS] ) ) ,
1361+ . define( " CLS_SDK_NAME " , to: " Crashlytics watchOS SDK " , . when( platforms: [ . watchOS] ) ) ,
1362+ . define( " PB_FIELD_32BIT " , to: " 1 " ) ,
1363+ . define( " PB_NO_PACKED_STRUCTS " , to: " 1 " ) ,
1364+ . define( " PB_ENABLE_MALLOC " , to: " 1 " ) ,
1365+ ]
1366+
1367+ if Context . environment [ " FIREBASE_IS_NIGHTLY_TESTING " ] != nil {
1368+ cSettings += [ . define( " FIREBASE_IS_NIGHTLY_TESTING " , to: " 1 " ) ]
1369+ }
1370+
1371+ return . target(
1372+ name: " FirebaseCrashlytics " ,
1373+ dependencies: [
1374+ " FirebaseCore " ,
1375+ " FirebaseInstallations " ,
1376+ " FirebaseSessions " ,
1377+ " FirebaseRemoteConfigInterop " ,
1378+ " FirebaseCrashlyticsSwift " ,
1379+ . product( name: " GoogleDataTransport " , package : " GoogleDataTransport " ) ,
1380+ . product( name: " GULEnvironment " , package : " GoogleUtilities " ) ,
1381+ . product( name: " FBLPromises " , package : " Promises " ) ,
1382+ . product( name: " nanopb " , package : " nanopb " ) ,
1383+ ] ,
1384+ path: " Crashlytics " ,
1385+ exclude: [
1386+ " run " ,
1387+ " CHANGELOG.md " ,
1388+ " LICENSE " ,
1389+ " README.md " ,
1390+ " ProtoSupport/ " ,
1391+ " UnitTests/ " ,
1392+ " generate_project.sh " ,
1393+ " upload-symbols " ,
1394+ " CrashlyticsInputFiles.xcfilelist " ,
1395+ " third_party/libunwind/LICENSE " ,
1396+ " Crashlytics/Rollouts/ " ,
1397+ ] ,
1398+ sources: [
1399+ " Crashlytics/ " ,
1400+ " Protogen/ " ,
1401+ " Shared/ " ,
1402+ " third_party/libunwind/dwarf.h " ,
1403+ ] ,
1404+ resources: [ . process( " Resources/PrivacyInfo.xcprivacy " ) ] ,
1405+ publicHeadersPath: " Crashlytics/Public " ,
1406+ cSettings: cSettings,
1407+ linkerSettings: [
1408+ . linkedFramework( " Security " ) ,
1409+ . linkedFramework( " SystemConfiguration " , . when( platforms: [ . iOS, . macOS, . tvOS] ) ) ,
1410+ ]
1411+ )
1412+ }
1413+
14051414func googleAppMeasurementDependency( ) -> Package . Dependency {
14061415 let appMeasurementURL = " https://github.com/google/GoogleAppMeasurement.git "
14071416
0 commit comments