fix(android): support Gradle configuration cache - #317
Open
huytdps13400 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #241.
Process.execute()package resolution with Gradle鈥檚 configuration-cache-awareproviders.exec()react-native-nitro-sqlite-vecresolver outputs as configuration inputsREACT_NATIVE_NODE_MODULES_DIRoverride, and vec resolution errorGradle documents
providers.exec { ... }.standardOutput.asText.get()as the supported API when configuration-time process output is required: https://docs.gradle.org/current/userguide/configuration_cache_requirements.html#config_cache:requirements:external_processesTest plan
Red
./gradlew :react-native-nitro-sqlite:tasks --configuration-cache --no-daemonfailed to store the cache with two problems:nodeprocess resolvingreact-native/package.jsonnodeprocess resolvingreact-native-nitro-sqlite-vec/package.jsonGreen
Reusing configuration cache:react-native-nitro-sqlite:assembleDebug --configuration-cachecompleted the Android/CMake build, stored the cache, and a subsequent invocation reportedConfiguration cache entry reusedbun typecheckbun sqlite buildbun lintgit diff --checkExisting test-infrastructure issue
bun sqlite teststops in Jest configuration before collecting tests because the current RN 0.85 dependency moved the preset fromreact-nativeto@react-native/jest-preset. This is reproducible on unchangedmainand is unrelated to the Gradle-only diff.