File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/create-react-native-library/src/utils Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
2
import fs from 'fs-extra' ;
3
3
4
+ // This is added to the example app's build.gradle file to invoke codegen before every build
4
5
const GRADLE_INVOKE_CODEGEN_TASK = `
5
6
def isNewArchitectureEnabled() {
6
7
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
@@ -15,6 +16,7 @@ if (isNewArchitectureEnabled()) {
15
16
preBuild.dependsOn invokeLibraryCodegen
16
17
}` ;
17
18
19
+ // This is added to the example app's xcscheme file to invoke codegen before every build
18
20
const XCODE_INVOKE_CODEGEN_ACTION = `
19
21
<PreActions>
20
22
<ExecutionAction
@@ -26,6 +28,8 @@ const XCODE_INVOKE_CODEGEN_ACTION = `
26
28
</ExecutionAction>
27
29
</PreActions>` ;
28
30
31
+ // You need to have the files before calling pod install otherwise they won't be registered in your pod.
32
+ // So we add a pre_install hook to the podfile that invokes codegen
29
33
const PODSPEC_INVOKE_CODEGEN_SCRIPT = `
30
34
pre_install do |installer|
31
35
system("cd ../../ && npx bob build --target codegen")
You can’t perform that action at this time.
0 commit comments