-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use v0.60.0 patch from jtreanor/react-native #1184
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
824be03
Use v0.60.0 patch from jtreanor/react-native
jtreanor 93cfefa
Update bin/generate-podspecs.sh for new RN CocoaPods integration
jtreanor 595cc40
Generated podspecs for v0.60.0-patched
jtreanor 150380b
Update Gutenberg.podspec & RNTAztec.podspec for new RN CocoaPods inte…
jtreanor b56a7dc
Update bin/generate-podspec.sh to generate podspec for non-RN third p…
jtreanor f39f6ea
Use patched third party libraries
jtreanor a630011
Add React-RCTText and React-RCTWebSocket to Gutenberg.podspec
jtreanor 512b708
Add React-DevSupport to Gutenberg.podspec
jtreanor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,23 +7,48 @@ set -e | |
cd "$( dirname $0 )" | ||
cd .. | ||
|
||
# Check for cocoapods | ||
# Check for cocoapods & jq | ||
command -v pod > /dev/null || ( echo Cocoapods is required to generate podspecs; exit 1 ) | ||
command -v jq > /dev/null || ( echo jq is required to generate podspecs; exit 1 ) | ||
|
||
PODSPECS=$(cat <<EOP | ||
node_modules/react-native/React.podspec | ||
node_modules/react-native/ReactCommon/yoga/yoga.podspec | ||
node_modules/react-native/third-party-podspecs/Folly.podspec | ||
node_modules/react-native/third-party-podspecs/DoubleConversion.podspec | ||
node_modules/react-native/third-party-podspecs/glog.podspec | ||
EOP | ||
) | ||
WD=$(pwd) | ||
DEST="${WD}/react-native-gutenberg-bridge/third-party-podspecs" | ||
|
||
DEST="react-native-gutenberg-bridge/third-party-podspecs" | ||
# Generate the external (non-RN podspecs) | ||
EXTERNAL_PODSPECS=$(find "node_modules/react-native/third-party-podspecs" \ | ||
"node_modules/react-native-svg" \ | ||
"node_modules/react-native-keyboard-aware-scroll-view" \ | ||
"node_modules/react-native-recyclerview-list" \ | ||
"node_modules/react-native-safe-area" -type f -name "*.podspec" -print) | ||
|
||
for podspec in $PODSPECS | ||
for podspec in $EXTERNAL_PODSPECS | ||
do | ||
pod=`basename $podspec .podspec` | ||
pod=$(basename "$podspec" .podspec) | ||
|
||
echo "Generating podspec for $pod" | ||
INSTALL_YOGA_WITHOUT_PATH_OPTION=1 pod ipc spec $podspec > "$DEST/$pod.podspec.json" | ||
done | ||
pod ipc spec $podspec > "$DEST/$pod.podspec.json" | ||
done | ||
|
||
# Generate the React Native podspecs | ||
# Change to the React Native directory to get relative paths for the RN podspecs | ||
cd "node_modules/react-native" | ||
|
||
RN_PODSPECS=$(find * -type f -name "*.podspec" -not -path "third-party-podspecs/*" -print) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now using |
||
TMP_DEST=$(mktemp -d) | ||
|
||
for podspec in $RN_PODSPECS | ||
do | ||
pod=$(basename "$podspec" .podspec) | ||
path=$(dirname "$podspec") | ||
|
||
echo "Generating podspec for $pod with path $path" | ||
pod ipc spec $podspec > "$TMP_DEST/$pod.podspec.json" | ||
cat "$TMP_DEST/$pod.podspec.json" | jq > "$DEST/$pod.podspec.json" | ||
|
||
# Add a "prepare_command" entry to each podspec so that 'pod install' will fetch sources from the correct directory | ||
# and retains the existing prepare_command if it exists | ||
prepare_command="TMP_DIR=\$(mktemp -d); mv * \$TMP_DIR; cp -R \"\$TMP_DIR/${path}\"/* ." | ||
cat "$TMP_DEST/$pod.podspec.json" | jq --arg CMD "$prepare_command" '.prepare_command = "\($CMD) && \(.prepare_command // true)" | ||
# Point to React Native fork. To be removed once https://github.com/facebook/react-native/issues/25349 is closed | ||
| .source.git = "https://github.com/jtreanor/react-native.git"' > "$DEST/$pod.podspec.json" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...t-native-gutenberg-bridge/third-party-podspecs/RNReactNativeRecyclerviewList.podspec.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "RNReactNativeRecyclerviewList", | ||
"version": "1.0.0", | ||
"summary": "RNReactNativeRecyclerviewList", | ||
"description": "RNReactNativeRecyclerviewList", | ||
"homepage": "", | ||
"license": "MIT", | ||
"authors": { | ||
"author": "author@domain.cn" | ||
}, | ||
"platforms": { | ||
"ios": "7.0" | ||
}, | ||
"source": { | ||
"git": "https://github.com/author/RNReactNativeRecyclerviewList.git", | ||
"tag": "master" | ||
}, | ||
"source_files": "RNReactNativeRecyclerviewList/**/*.{h,m}", | ||
"requires_arc": true, | ||
"dependencies": { | ||
"React-Core": [ | ||
|
||
] | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
react-native-gutenberg-bridge/third-party-podspecs/RNSVG.podspec.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "RNSVG", | ||
"version": "9.3.3", | ||
"summary": "SVG library for react-native", | ||
"license": "MIT", | ||
"homepage": "https://github.com/react-native-community/react-native-svg", | ||
"authors": "Horcrux Chen", | ||
"source": { | ||
"git": "https://github.com/react-native-community/react-native-svg.git", | ||
"tag": "9.3.3" | ||
}, | ||
"source_files": "ios/**/*.{h,m}", | ||
"requires_arc": true, | ||
"platforms": { | ||
"ios": "8.0", | ||
"tvos": "9.2" | ||
}, | ||
"dependencies": { | ||
"React-Core": [ | ||
|
||
], | ||
"React-RCTImage": [ | ||
|
||
] | ||
}, | ||
"prepare_command": "sed -i \"\" \"s/React\\/RCTImageLoader.h/RCTImage\\/RCTImageLoader.h/g\" ios/Elements/RNSVGImage.m" | ||
} |
29 changes: 29 additions & 0 deletions
29
react-native-gutenberg-bridge/third-party-podspecs/React-ART.podspec.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "React-ART", | ||
"version": "0.60.0-patched", | ||
"summary": "A library for drawing vector graphics.", | ||
"homepage": "http://facebook.github.io/react-native/", | ||
"license": "MIT", | ||
"authors": "Facebook, Inc. and its affiliates", | ||
"platforms": { | ||
"ios": "9.0", | ||
"tvos": "9.2" | ||
}, | ||
"source": { | ||
"git": "https://github.com/jtreanor/react-native.git", | ||
"tag": "v0.60.0-patched" | ||
}, | ||
"source_files": "**/*.{h,m}", | ||
"preserve_paths": [ | ||
"package.json", | ||
"LICENSE", | ||
"LICENSE-docs" | ||
], | ||
"header_dir": "ART", | ||
"dependencies": { | ||
"React-Core": [ | ||
"0.60.0-patched" | ||
] | ||
}, | ||
"prepare_command": "TMP_DIR=$(mktemp -d); mv * $TMP_DIR; cp -R \"$TMP_DIR/Libraries/ART\"/* . && true" | ||
} |
72 changes: 72 additions & 0 deletions
72
react-native-gutenberg-bridge/third-party-podspecs/React-Core.podspec.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"name": "React-Core", | ||
"version": "0.60.0-patched", | ||
"summary": "The core of React Native.", | ||
"homepage": "http://facebook.github.io/react-native/", | ||
"license": "MIT", | ||
"authors": "Facebook, Inc. and its affiliates", | ||
"platforms": { | ||
"ios": "9.0", | ||
"tvos": "9.2" | ||
}, | ||
"source": { | ||
"git": "https://github.com/jtreanor/react-native.git", | ||
"tag": "v0.60.0-patched" | ||
}, | ||
"source_files": "**/*.{c,h,m,mm,S,cpp}", | ||
"exclude_files": [ | ||
"DevSupport/**/*", | ||
"Fabric/**/*", | ||
"Inspector/**/*" | ||
], | ||
"ios": { | ||
"exclude_files": "**/RCTTV*.*" | ||
}, | ||
"tvos": { | ||
"exclude_files": [ | ||
"Modules/RCTClipboard*", | ||
"Views/RCTDatePicker*", | ||
"Views/RCTPicker*", | ||
"Views/RCTRefreshControl*", | ||
"Views/RCTSlider*", | ||
"Views/RCTSwitch*" | ||
] | ||
}, | ||
"private_header_files": "Cxx*/*.h", | ||
"compiler_flags": "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation", | ||
"header_dir": "React", | ||
"frameworks": "JavaScriptCore", | ||
"libraries": "stdc++", | ||
"pod_target_xcconfig": { | ||
"HEADER_SEARCH_PATHS": "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\"" | ||
}, | ||
"default_subspecs": "Default", | ||
"dependencies": { | ||
"Folly": [ | ||
"2018.10.22.00" | ||
], | ||
"React-cxxreact": [ | ||
"0.60.0-patched" | ||
], | ||
"React-jsi": [ | ||
"0.60.0-patched" | ||
], | ||
"React-jsiexecutor": [ | ||
"0.60.0-patched" | ||
], | ||
"yoga": [ | ||
"0.60.0-patched.React" | ||
], | ||
"glog": [] | ||
}, | ||
"subspecs": [ | ||
{ | ||
"name": "Default" | ||
}, | ||
{ | ||
"name": "CxxBridge", | ||
"public_header_files": "**/*.{h}" | ||
} | ||
], | ||
"prepare_command": "TMP_DIR=$(mktemp -d); mv * $TMP_DIR; cp -R \"$TMP_DIR/React\"/* . && true" | ||
} |
33 changes: 33 additions & 0 deletions
33
react-native-gutenberg-bridge/third-party-podspecs/React-DevSupport.podspec.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "React-DevSupport", | ||
"version": "0.60.0-patched", | ||
"summary": "-", | ||
"homepage": "http://facebook.github.io/react-native/", | ||
"license": "MIT", | ||
"authors": "Facebook, Inc. and its affiliates", | ||
"platforms": { | ||
"ios": "9.0", | ||
"tvos": "9.2" | ||
}, | ||
"source": { | ||
"git": "https://github.com/jtreanor/react-native.git", | ||
"tag": "v0.60.0-patched" | ||
}, | ||
"source_files": [ | ||
"DevSupport/*", | ||
"Inspector/*" | ||
], | ||
"header_dir": "DevSupport", | ||
"dependencies": { | ||
"React-Core": [ | ||
"0.60.0-patched" | ||
], | ||
"React-jsinspector": [ | ||
"0.60.0-patched" | ||
], | ||
"React-RCTWebSocket": [ | ||
"0.60.0-patched" | ||
] | ||
}, | ||
"prepare_command": "TMP_DIR=$(mktemp -d); mv * $TMP_DIR; cp -R \"$TMP_DIR/React\"/* . && true" | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reducing these to only what we need means that the build will be leaner and hopefully faster. Transitive dependencies (such as
yoga
) will still be resolved.