Skip to content

Commit

Permalink
fix: creating library with react-native-test-app example (#622)
Browse files Browse the repository at this point in the history
<!-- Please provide enough information so that others can review your
pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Summary

Conditionally add codegen-releated stuff added recently to unblocks the
command.

### Test plan

1. `create-react-native-library`
2. Choose test app as an example
3. `example/` apps should build.
  • Loading branch information
szymonrybczak authored Sep 5, 2024
1 parent eacd9ce commit 25f9556
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/create-react-native-library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ async function create(_argv: yargs.Arguments<any>) {
examplePackageJson.dependencies['react-native'];
}

if (arch !== 'legacy') {
if (arch !== 'legacy' && example === 'vanilla') {
addCodegenBuildScript(folder, options.project.name);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,12 @@
},
"android": {
"javaPackageName": "com.<%- project.package %>"
<% if (example === 'vanilla') { -%>
},
"includesGeneratedCode": true
<% } else { -%>
}
<% } -%>
<% } -%>
}
}

0 comments on commit 25f9556

Please sign in to comment.