Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,14 @@ function execute(

const reactNativeConfig = readReactNativeConfig(
projectRoot,
baseOutputPath,
// NOTE: Used to load `build/generated/autolinking/autolinking.json` generated by `scripts/cocoapods/autolinking.rb`
// If we have RCT_SCRIPT_OUTPUT_DIR (set in `react_native_pods_utils/script_phases.sh`, it takes precedence, otherwise
// we search for the `autolinking.json` output in the `baseOutputPath`
process.env.RCT_SCRIPT_OUTPUT_DIR != null && process.env.RCT_SCRIPT_OUTPUT_DIR.length > 0
? process.env.RCT_SCRIPT_OUTPUT_DIR
: baseOutputPath,
);

const codegenEnabledLibraries = findCodegenEnabledLibraries(
pkgJson,
projectRoot,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ generateCodegenArtifactsFromSchema () {
generateArtifacts () {
describe "Generating codegen artifacts"
pushd "$RCT_SCRIPT_RN_DIR" >/dev/null || exit 1
"$NODE_BINARY" "scripts/generate-codegen-artifacts.js" --path "$RCT_SCRIPT_APP_PATH" --outputPath "$TEMP_OUTPUT_DIR" --targetPlatform "ios"
"$NODE_BINARY" "scripts/generate-codegen-artifacts.js" --path "$RCT_SCRIPT_APP_PATH" --outputPath "$RCT_SCRIPT_OUTPUT_DIR" --targetPlatform "ios"
popd >/dev/null || exit 1
}

Expand All @@ -110,11 +110,9 @@ moveOutputs () {
}

withCodegenDiscovery () {
setup_dirs
find_node
find_codegen
generateArtifacts
moveOutputs
}

noCodegenDiscovery () {
Expand Down
Loading