Skip to content

Commit

Permalink
[Discord] jsc-android fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Flewp committed Jul 18, 2024
1 parent 4343134 commit f22d419
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"jest": "^29.6.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.14.0",
"jsc-android": "^250231.0.0",
"metro-babel-register": "^0.80.0",
"metro-memory-fs": "^0.80.0",
"micromatch": "^4.0.4",
Expand Down
3 changes: 1 addition & 2 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ val prepareGlog by
// Create Android native library module based on jsc from npm
val prepareJSC by
tasks.registering(PrepareJSCTask::class) {
jscPackagePath.set("$rootDir/../../discord_app/node_modules/jsc-android")
jscPackagePath.set(project.findProperty("JSC_ANDROID_PATH_OVERRIDE")?.toString() ?: findNodeModulePath(projectDir, "jsc-android"))
outputDir = project.layout.buildDirectory.dir("third-party-ndk/jsc")
}

Expand Down Expand Up @@ -445,7 +445,6 @@ fun findNodeModulePath(baseDir: File, packageName: String): String? {
while (basePath != null) {
val candidatePath = Paths.get(basePath.toString(), "node_modules", packageName)
if (candidatePath.toFile().exists()) {
println("NODEMODULES " + candidatePath.toString())
return candidatePath.toString()
}
basePath = basePath.parent
Expand Down

0 comments on commit f22d419

Please sign in to comment.