fix: bump gradle wrapper version to 7.5.1 & not use app node_modules when running tasks from repo #2186
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.
Description
Basically tasks run from react-native-screens repo (such as linting & formating) would fail due to outdated gradle wrapper version (and the fact that we re using newer JDK now).
There was a second issue: when running tasks from react-native-screens project as gradle's
rootProject
and simultaneously havingreact-native
repo side-by-side toreact-native-screens
repo on disk - our current react native directory resolution algorithm would have found it and attempt to use to retrieve RN version, but:
Changes
There was also possibility to "reorder the ifs" in
resolveReactNativeDir
function, however this could possible cause issues in user projects - we want first to look for app's node modulesand later for project node modules.
Test code and steps to reproduce
yarn lint-android
,yarn format-android
, etc. should now work just fine when you re on JDK 17+ & havereact-native
repo side by side toreact-native-screens
.Checklist