From f9a5bdc1ead77ba592ed08f64e4bdc279aa61e2a Mon Sep 17 00:00:00 2001 From: Haritabh <41149926+haritabh-z01@users.noreply.github.com> Date: Sun, 25 May 2025 20:25:19 +0530 Subject: [PATCH] turbo.swift.build.cache (#14) * chore: switch from polling to event for screen change detection * chore: enable caching of swift helper builds --- .../native-helpers/swift-helper/package.json | 4 ++-- .../native-helpers/swift-helper/turbo.json | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 packages/native-helpers/swift-helper/turbo.json diff --git a/packages/native-helpers/swift-helper/package.json b/packages/native-helpers/swift-helper/package.json index d6e88c9..b81ef5c 100644 --- a/packages/native-helpers/swift-helper/package.json +++ b/packages/native-helpers/swift-helper/package.json @@ -5,8 +5,8 @@ "private": true, "scripts": { "build": "pnpm --filter @amical/types generate:all && turbo run build:native", - "build:native": "swift build --configuration release && mkdir -p bin && cp .build/release/SwiftHelper bin/SwiftHelper", - "clean": "rm -rf .build bin", + "build:native": "mkdir -p .build && swift build --configuration release && mkdir -p bin && cp .build/release/SwiftHelper bin/SwiftHelper", + "clean": "rm -rf .build bin .turbo", "dev": "pnpm --filter @amical/types generate:all && swift build --configuration debug && mkdir -p bin && cp .build/debug/SwiftHelper bin/SwiftHelper" }, "files": [ diff --git a/packages/native-helpers/swift-helper/turbo.json b/packages/native-helpers/swift-helper/turbo.json new file mode 100644 index 0000000..c4f5316 --- /dev/null +++ b/packages/native-helpers/swift-helper/turbo.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://turborepo.com/schema.json", + "extends": ["//"], + "tasks": { + "build": { + "dependsOn": ["@amical/types#generate:all"], + "inputs": [ + "Sources/**", + "Package.swift", + "Package.resolved", + ".swiftpm/**" + ], + "outputs": [ + ".build/**", + "bin/SwiftHelper" + ], + "cache": true + } + } +} \ No newline at end of file