Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,7 +35,7 @@ def isNewArchitectureEnabled() {
}

// spotless is only accessible within react-native-screens repo
if (project == rootProject) {
if (isRunningInContextOfScreensRepo()) {
apply from: 'spotless.gradle'
}

Expand All @@ -58,7 +62,7 @@ def resolveReactNativeDirectory() {
}

def reactNativeFromAppNodeModules = file("${projectDir}/../../react-native")
if (reactNativeFromAppNodeModules.exists()) {
if (!isRunningInContextOfScreensRepo() && reactNativeFromAppNodeModules.exists()) {
return reactNativeFromAppNodeModules
}

Expand All @@ -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."
)
}

Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip