From a2024246378272b49f1727dc4395f2725f3bc616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Gu=CC=88ner?= Date: Fri, 5 Jul 2024 21:16:06 +0300 Subject: [PATCH] docs: add comments to example app codegen files --- .../src/utils/patchExampleAppCodegen.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/create-react-native-library/src/utils/patchExampleAppCodegen.ts b/packages/create-react-native-library/src/utils/patchExampleAppCodegen.ts index 67d497739..405687eef 100644 --- a/packages/create-react-native-library/src/utils/patchExampleAppCodegen.ts +++ b/packages/create-react-native-library/src/utils/patchExampleAppCodegen.ts @@ -1,6 +1,7 @@ import path from 'path'; import fs from 'fs-extra'; +// This is added to the example app's build.gradle file to invoke codegen before every build const GRADLE_INVOKE_CODEGEN_TASK = ` def isNewArchitectureEnabled() { return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" @@ -15,6 +16,7 @@ if (isNewArchitectureEnabled()) { preBuild.dependsOn invokeLibraryCodegen }`; +// This is added to the example app's xcscheme file to invoke codegen before every build const XCODE_INVOKE_CODEGEN_ACTION = ` `; +// You need to have the files before calling pod install otherwise they won't be registered in your pod. +// So we add a pre_install hook to the podfile that invokes codegen const PODSPEC_INVOKE_CODEGEN_SCRIPT = ` pre_install do |installer| system("cd ../../ && npx bob build --target codegen")