From 105214bb6b24c06f62f5458595aef9007e091778 Mon Sep 17 00:00:00 2001 From: "mathieu J." Date: Wed, 20 Nov 2024 12:40:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20(LekaApp):=20Finish=20Crashlitic?= =?UTF-8?q?s=20setup=20in=20Project.swift?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Apps/LekaApp/Project.swift | 18 ++++++++++++++++++ .../Project+App.swift | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Apps/LekaApp/Project.swift b/Apps/LekaApp/Project.swift index 6dc1e8f32..f060f5d2d 100644 --- a/Apps/LekaApp/Project.swift +++ b/Apps/LekaApp/Project.swift @@ -27,6 +27,19 @@ let kLekaApp: App = if Environment.productionBuild.getBoolean( ) } +let crashlyticsRunScript: TargetScript = .post( + path: "../../Tuist/.build/checkouts/firebase-ios-sdk/Crashlytics/run", + name: "Upload dSYMs", + inputPaths: [ + "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}", + "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}", + "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist", + "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist", + "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)", + ], + basedOnDependencyAnalysis: false +) + let kLekaAppFirebaseInfoPlistPath: ResourceFileElement = if Environment.productionBuild.getBoolean( default: false ) { @@ -63,6 +76,8 @@ let project = Project.app( resources: [kLekaAppFirebaseInfoPlistPath], settings: SettingsDictionary.extendingBase(with: [ "ASSETCATALOG_COMPILER_APPICON_NAME": "\(kLekaApp.appIcon)", + "DEBUG_INFORMATION_FORMAT": "dwarf-with-dsym", + "STRIP_DEBUG_SYMBOLS": "$(inherited)", ]), dependencies: [ .project(target: "AccountKit", path: Path("../../Modules/AccountKit")), @@ -82,5 +97,8 @@ let project = Project.app( .external(name: "Fit"), .external(name: "MarkdownUI"), .external(name: "Yams"), + ], + scripts: [ + crashlyticsRunScript, ] ) diff --git a/Tuist/ProjectDescriptionHelpers/Project+App.swift b/Tuist/ProjectDescriptionHelpers/Project+App.swift index d3cf3e7ee..a8e13e7e6 100644 --- a/Tuist/ProjectDescriptionHelpers/Project+App.swift +++ b/Tuist/ProjectDescriptionHelpers/Project+App.swift @@ -47,6 +47,7 @@ public extension Project { launchArguments: [LaunchArgument] = [], options: Options = .options(), dependencies: [TargetDependency] = [], + scripts: [TargetScript] = [], // New `scripts` parameter schemes: [Scheme] = [] ) -> Project { let mainTarget = Target.target( @@ -58,7 +59,7 @@ public extension Project { infoPlist: .extendingDefault(with: InfoPlist.extendingBase(version: version, with: infoPlist)), sources: ["Sources/**"], resources: .resources(["Resources/**"] + resources), - scripts: TargetScript.linters(), + scripts: TargetScript.linters() + scripts, // Combine default scripts with custom scripts dependencies: dependencies, settings: .settings(base: .extendingBase(with: settings)), environmentVariables: [