From 9147b0753a6c3afb2480b079f91614cd7189a28a Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Mon, 2 Dec 2024 05:09:54 -0800 Subject: [PATCH] fix IOException in BuildCodegenCLITask (#48008) Summary: building RN tester with 0.77 rc-0 doesn't work now because of `java.io.IOException: No such file or directory` on line 48. `buildDirectory` is a Gradle property representing a file https://github.com/facebook/react-native/pull/47552 removes this file altogether so feel free to close if that one is the "right one" ## Changelog: [ANDROID] [FIXED] - fix IOException in `BuildCodegenCLITask` Pull Request resolved: https://github.com/facebook/react-native/pull/48008 Test Plan: After this change, building RN tester works. Reviewed By: cortinico Differential Revision: D66650038 Pulled By: robhogan fbshipit-source-id: 11cd83493fa118c6b79d11c9113228dd3971a803 --- .../com/facebook/react/tasks/internal/BuildCodegenCLITask.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITask.kt b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITask.kt index 622a660a282bff..72f507de6fad8b 100644 --- a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITask.kt +++ b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/BuildCodegenCLITask.kt @@ -39,7 +39,7 @@ abstract class BuildCodegenCLITask : Exec() { } override fun exec() { - val logfile = "${project.layout.buildDirectory}/build-cli.log" + val logfile = "${project.layout.buildDirectory.getAsFile().get()}/build-cli.log" File(logfile).apply { parentFile.mkdirs() if (exists()) {