Skip to content

Commit

Permalink
🔧 (LekaApp): Finish Crashlitics setup in Project.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
macteuts committed Nov 21, 2024
1 parent 38fd90a commit 105214b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions Apps/LekaApp/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
Expand Down Expand Up @@ -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")),
Expand All @@ -82,5 +97,8 @@ let project = Project.app(
.external(name: "Fit"),
.external(name: "MarkdownUI"),
.external(name: "Yams"),
],
scripts: [
crashlyticsRunScript,
]
)
3 changes: 2 additions & 1 deletion Tuist/ProjectDescriptionHelpers/Project+App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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: [
Expand Down

0 comments on commit 105214b

Please sign in to comment.