From f22d41948a1dfb526ab264dd2c321aecfe20c0df Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Thu, 18 Jul 2024 13:24:47 -0500 Subject: [PATCH] [Discord] jsc-android fixes --- package.json | 1 + packages/react-native/ReactAndroid/build.gradle.kts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 134d9f8045a888..9e8b064383657d 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/react-native/ReactAndroid/build.gradle.kts b/packages/react-native/ReactAndroid/build.gradle.kts index b1ba75be257e28..49b3d845f36afe 100644 --- a/packages/react-native/ReactAndroid/build.gradle.kts +++ b/packages/react-native/ReactAndroid/build.gradle.kts @@ -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") } @@ -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