From 9ddcf4d73fbe20840fbd21802d51b06306d1f1a6 Mon Sep 17 00:00:00 2001 From: Bao Nguyen Date: Tue, 1 Sep 2026 16:35:29 +0700 Subject: [PATCH] fix(ci): hash the library sources in the native build tasks Both build:android and build:ios only exist as scripts in the example package, so every bare input glob resolved inside example/. The library's own src/, android/, ios/, podspec and nitro.json were not hashed at all, and the example/* entries pointed at example/example/*. Editing the Nitro spec or the Kotlin and Swift sources left both task hashes untouched, so CI reported a cache HIT and skipped the JDK, CocoaPods and build steps. Reach the root files through $TURBO_ROOT$ and widen the example globs to the whole source tree. --- turbo.json | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/turbo.json b/turbo.json index 8b2bf08..32f06c3 100644 --- a/turbo.json +++ b/turbo.json @@ -5,17 +5,19 @@ "tasks": { "build:android": { "env": ["ANDROID_HOME", "ORG_GRADLE_PROJECT_newArchEnabled"], + // Both scripts live in the example package, so bare globs resolve inside + // it; the library's own sources need the $TURBO_ROOT$ prefix. "inputs": [ + "$TURBO_ROOT$/package.json", + "$TURBO_ROOT$/nitro.json", + "$TURBO_ROOT$/src/**", + "$TURBO_ROOT$/android/**", "package.json", - "android", - "!android/build", - "src/*.ts", - "src/*.tsx", - "example/package.json", - "example/android", - "!example/android/.gradle", - "!example/android/build", - "!example/android/app/build" + "src/**", + "android/**", + "!android/.gradle/**", + "!android/build/**", + "!android/app/build/**" ], "outputs": [] }, @@ -27,15 +29,16 @@ "RCT_USE_PREBUILT_RNCORE" ], "inputs": [ + "$TURBO_ROOT$/package.json", + "$TURBO_ROOT$/nitro.json", + "$TURBO_ROOT$/*.podspec", + "$TURBO_ROOT$/src/**", + "$TURBO_ROOT$/ios/**", "package.json", - "*.podspec", - "ios", - "src/*.ts", - "src/*.tsx", - "example/package.json", - "example/ios", - "!example/ios/build", - "!example/ios/Pods" + "src/**", + "ios/**", + "!ios/build/**", + "!ios/Pods/**" ], "outputs": [] }