Skip to content
Open
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 packages/react-native-reanimated/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ fun safeAppExtGet(prop: String, fallback: Any?): Any? {
}

fun resolveReactNativeDirectory(): File {
val reactNativeLocation = safeAppExtGet("REACT_NATIVE_NODE_MODULES_DIR", null) as String?
if (reactNativeLocation != null) {
return file(reactNativeLocation)
val reactNativeLocationProperty = safeAppExtGet("REACT_NATIVE_NODE_MODULES_DIR", null)
if (reactNativeLocationProperty != null) {
return when (reactNativeLocationProperty) {
is File -> reactNativeLocationProperty
is String -> file(reactNativeLocationProperty)
else -> file(reactNativeLocationProperty.toString())
}
}

// Fallback to node resolver for custom directory structures like monorepos.
Expand Down
10 changes: 7 additions & 3 deletions packages/react-native-worklets/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ fun safeAppExtGet(prop: String, fallback: Any?): Any? {
}

fun resolveReactNativeDirectory(): File {
val reactNativeLocation = safeAppExtGet("REACT_NATIVE_NODE_MODULES_DIR", null) as String?
if (reactNativeLocation != null) {
return file(reactNativeLocation)
val reactNativeLocationProperty = safeAppExtGet("REACT_NATIVE_NODE_MODULES_DIR", null)
if (reactNativeLocationProperty != null) {
return when (reactNativeLocationProperty) {
is File -> reactNativeLocationProperty
is String -> file(reactNativeLocationProperty)
else -> file(reactNativeLocationProperty.toString())
}
}

// Fallback to node resolver for custom directory structures like monorepos.
Expand Down