From 3549dd555e49ee1c976e271665a1fc8665fdc28c Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Mon, 17 Jun 2024 11:13:46 +0200 Subject: [PATCH 1/2] Bump gradle wrapper version to 7.5.1 --- android/gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 9946c0130b..567ad65ab4 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip From 2c418aa866685e7470677ed73588e19f235d127a Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Mon, 17 Jun 2024 11:14:38 +0200 Subject: [PATCH 2/2] Do not use App node modules when runing in context of screens repo --- android/build.gradle | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 89ea486f6d..b2a4b88a15 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -22,6 +22,10 @@ buildscript { } } +def isRunningInContextOfScreensRepo() { + return project == rootProject +} + def isNewArchitectureEnabled() { // To opt-in for the New Architecture, you can either: // - Set `newArchEnabled` to true inside the `gradle.properties` file @@ -31,7 +35,7 @@ def isNewArchitectureEnabled() { } // spotless is only accessible within react-native-screens repo -if (project == rootProject) { +if (isRunningInContextOfScreensRepo()) { apply from: 'spotless.gradle' } @@ -58,7 +62,7 @@ def resolveReactNativeDirectory() { } def reactNativeFromAppNodeModules = file("${projectDir}/../../react-native") - if (reactNativeFromAppNodeModules.exists()) { + if (!isRunningInContextOfScreensRepo() && reactNativeFromAppNodeModules.exists()) { return reactNativeFromAppNodeModules } @@ -68,7 +72,7 @@ def resolveReactNativeDirectory() { } throw new GradleException( - "[RNScreens] Unable to resolve react-native location in node_modules. You should project extension property (in `app/build.gradle`) `REACT_NATIVE_NODE_MODULES_DIR` with path to react-native." + "[RNScreens] Unable to resolve react-native location in node_modules. You should add project extension property (in `app/build.gradle`) `REACT_NATIVE_NODE_MODULES_DIR` with path to react-native." ) }