File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -201,13 +201,13 @@ class ReactPlugin : Plugin<Project> {
201201
202202 /* *
203203 NOTE(flewp): The react-native repository has two "react-native-codegen" projects, one in packages/, and one provided
204- as a node module by yarn (eventually existing in node_modules). When we build React Native from source, we do not yarn
205- the react-native project, so we're forcing the codegenDir to point to the packages version if we're in our
206- Discord-only-TurboModule-codegen build state.
204+ as a node module by yarn (eventually existing in node_modules). Point to the one in the app's node_modules to allow
205+ for specifying different versions of react-native-codegen from the app
206+ (since 'codegenDir' property in library is not supported in this RN version: https://github.com/facebook/react-native/issues/35495)
207207 */
208208 internal fun Project.getCodegenDir (extension : ReactExtension ) = if (project.onlyDiscordTurboModuleCodegen())
209209 project.objects.directoryProperty().convention(
210- project.rootProject.layout.projectDirectory.dir(" ../../discord_app/node_modules/react-native/packages/react-native -codegen" )
210+ project.rootProject.layout.projectDirectory.dir(" ../../discord_app/node_modules/react-native-codegen" )
211211 )
212212 else extension.codegenDir
213213
You can’t perform that action at this time.
0 commit comments