From 7f8c2985a8e447fd18f8b9331d4f35abeadaeb0e Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Wed, 7 Dec 2016 05:12:11 -0800 Subject: [PATCH] Rename directories Reviewed By: gkassabli Differential Revision: D4284681 fbshipit-source-id: f0c6855c2c6e4389b7867f48f72cbb697830fc5a --- .../UIExplorer.xcodeproj/project.pbxproj | 16 +-- Libraries/Text/RCTTextManager.m | 2 +- React.podspec | 10 +- React/Base/RCTConvert.h | 2 +- React/Modules/RCTUIManager.m | 2 +- React/React.xcodeproj/project.pbxproj | 132 +++++++++--------- React/Views/RCTShadowView.h | 2 +- ReactAndroid/DEFS | 8 +- ReactAndroid/src/main/java/com/facebook/BUCK | 6 +- .../main/java/com/facebook/csslayout/README | 15 -- .../java/com/facebook/react/uimanager/BUCK | 2 +- .../react/uimanager/ReactShadowNode.java | 2 +- .../java/com/facebook/react/views/art/BUCK | 2 +- .../java/com/facebook/react/views/drawer/BUCK | 2 +- .../java/com/facebook/react/views/image/BUCK | 2 +- .../java/com/facebook/react/views/modal/BUCK | 2 +- .../com/facebook/react/views/progressbar/BUCK | 2 +- .../java/com/facebook/react/views/slider/BUCK | 2 +- .../com/facebook/react/views/switchview/BUCK | 2 +- .../java/com/facebook/react/views/text/BUCK | 2 +- .../react/views/text/frescosupport/BUCK | 2 +- .../com/facebook/react/views/textinput/BUCK | 2 +- .../com/facebook/react/views/toolbar/BUCK | 2 +- .../java/com/facebook/react/views/view/BUCK | 2 +- .../react/views/viewpager/ReactViewPager.java | 2 +- .../{csslayout => yoga}/YogaAlign.java | 0 .../{csslayout => yoga}/YogaConstants.java | 0 .../{csslayout => yoga}/YogaDimension.java | 0 .../{csslayout => yoga}/YogaDirection.java | 0 .../{csslayout => yoga}/YogaEdge.java | 0 .../YogaExperimentalFeature.java | 0 .../YogaFlexDirection.java | 0 .../{csslayout => yoga}/YogaJustify.java | 0 .../{csslayout => yoga}/YogaLogLevel.java | 0 .../{csslayout => yoga}/YogaLogger.java | 0 .../YogaMeasureFunction.java | 0 .../{csslayout => yoga}/YogaMeasureMode.java | 0 .../YogaMeasureOutput.java | 0 .../{csslayout => yoga}/YogaNode.java | 0 .../{csslayout => yoga}/YogaNodeAPI.java | 0 .../{csslayout => yoga}/YogaOverflow.java | 0 .../{csslayout => yoga}/YogaPositionType.java | 0 .../{csslayout => yoga}/YogaPrintOptions.java | 0 .../{csslayout => yoga}/YogaWrap.java | 0 .../{csslayoutjni => yogajni}/Android.mk | 2 +- .../{csslayoutjni => yogajni}/BUCK | 2 +- .../{csslayoutjni => yogajni}/jni/YGJNI.cpp | 2 +- .../src/main/jni/xreact/jni/Android.mk | 2 +- .../src/test/java/com/facebook/react/BUCK | 2 +- .../test/java/com/facebook/react/modules/BUCK | 2 +- .../java/com/facebook/react/uimanager/BUCK | 2 +- .../test/java/com/facebook/react/views/BUCK | 2 +- ReactCommon/{CSSLayout => yoga}/Android.mk | 4 +- ReactCommon/{CSSLayout => yoga}/BUCK | 6 +- .../CSSLayout => yoga/yoga}/YGEnums.h | 0 .../CSSLayout => yoga/yoga}/YGMacros.h | 0 .../CSSLayout => yoga/yoga}/YGNodeList.c | 0 .../CSSLayout => yoga/yoga}/YGNodeList.h | 0 .../{CSSLayout/CSSLayout => yoga/yoga}/Yoga.c | 16 +-- .../{CSSLayout/CSSLayout => yoga/yoga}/Yoga.h | 2 +- scripts/sync-css-layout.sh | 46 +++--- 61 files changed, 148 insertions(+), 167 deletions(-) delete mode 100644 ReactAndroid/src/main/java/com/facebook/csslayout/README rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaAlign.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaConstants.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaDimension.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaDirection.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaEdge.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaExperimentalFeature.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaFlexDirection.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaJustify.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaLogLevel.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaLogger.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaMeasureFunction.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaMeasureMode.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaMeasureOutput.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaNode.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaNodeAPI.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaOverflow.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaPositionType.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaPrintOptions.java (100%) rename ReactAndroid/src/main/java/com/facebook/{csslayout => yoga}/YogaWrap.java (100%) rename ReactAndroid/src/main/jni/first-party/{csslayoutjni => yogajni}/Android.mk (93%) rename ReactAndroid/src/main/jni/first-party/{csslayoutjni => yogajni}/BUCK (91%) rename ReactAndroid/src/main/jni/first-party/{csslayoutjni => yogajni}/jni/YGJNI.cpp (99%) rename ReactCommon/{CSSLayout => yoga}/Android.mk (85%) rename ReactCommon/{CSSLayout => yoga}/BUCK (70%) rename ReactCommon/{CSSLayout/CSSLayout => yoga/yoga}/YGEnums.h (100%) rename ReactCommon/{CSSLayout/CSSLayout => yoga/yoga}/YGMacros.h (100%) rename ReactCommon/{CSSLayout/CSSLayout => yoga/yoga}/YGNodeList.c (100%) rename ReactCommon/{CSSLayout/CSSLayout => yoga/yoga}/YGNodeList.h (100%) rename ReactCommon/{CSSLayout/CSSLayout => yoga/yoga}/Yoga.c (99%) rename ReactCommon/{CSSLayout/CSSLayout => yoga/yoga}/Yoga.h (98%) diff --git a/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj b/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj index 87d136af2..58d407497 100644 --- a/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj +++ b/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj @@ -337,14 +337,14 @@ containerPortal = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3C059A1DE3340900C268FA; - remoteInfo = CSSLayout; + remoteInfo = yoga; }; 3D3C08821DE3424E00C268FA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3C06751DE3340C00C268FA; - remoteInfo = "CSSLayout-tvOS"; + remoteInfo = "yoga-tvOS"; }; 58005BED1ABA80530062E044 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -726,8 +726,8 @@ children = ( 14AADF041AC3DB95002390C9 /* libReact.a */, 2DD323D91DA2DD8B000FE1B8 /* libReact-tvOS.a */, - 3D3C08811DE3424E00C268FA /* libCSSLayout.a */, - 3D3C08831DE3424E00C268FA /* libCSSLayout-tvOS.a */, + 3D3C08811DE3424E00C268FA /* libyoga.a */, + 3D3C08831DE3424E00C268FA /* libyoga-tvOS.a */, 3D05748C1DE6008900184BB4 /* libcxxreact.a */, 3D05748E1DE6008900184BB4 /* libcxxreact-tvOS.a */, 3D0574901DE6008900184BB4 /* libjschelpers.a */, @@ -1290,17 +1290,17 @@ remoteRef = 3D0574911DE6008900184BB4 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 3D3C08811DE3424E00C268FA /* libCSSLayout.a */ = { + 3D3C08811DE3424E00C268FA /* libyoga.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = libCSSLayout.a; + path = libyoga.a; remoteRef = 3D3C08801DE3424E00C268FA /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 3D3C08831DE3424E00C268FA /* libCSSLayout-tvOS.a */ = { + 3D3C08831DE3424E00C268FA /* libyoga-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = "libCSSLayout-tvOS.a"; + path = "libyoga-tvOS.a"; remoteRef = 3D3C08821DE3424E00C268FA /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; diff --git a/Libraries/Text/RCTTextManager.m b/Libraries/Text/RCTTextManager.m index 526ef281e..d5c8c86ae 100644 --- a/Libraries/Text/RCTTextManager.m +++ b/Libraries/Text/RCTTextManager.m @@ -9,7 +9,7 @@ #import "RCTTextManager.h" -#import +#import #import #import #import diff --git a/React.podspec b/React.podspec index 8d042951e..2e0b68934 100644 --- a/React.podspec +++ b/React.podspec @@ -31,10 +31,10 @@ Pod::Spec.new do |s| s.preserve_paths = "cli.js", "Libraries/**/*.js", "lint", "linter.js", "node_modules", "package.json", "packager", "PATENTS", "react-native-cli" s.subspec 'Core' do |ss| - ss.dependency 'React/CSSLayout' + ss.dependency 'React/yoga' ss.dependency 'React/cxxreact' ss.source_files = "React/**/*.{c,h,m,mm,S}" - ss.exclude_files = "**/__tests__/*", "IntegrationTests/* ReactCommon/CSSLayout/*" + ss.exclude_files = "**/__tests__/*", "IntegrationTests/* ReactCommon/yoga/*" ss.frameworks = "JavaScriptCore" ss.libraries = "stdc++" end @@ -50,9 +50,9 @@ Pod::Spec.new do |s| ss.header_dir = 'cxxreact' end - s.subspec 'CSSLayout' do |ss| - ss.source_files = 'ReactCommon/CSSLayout/**/*.{c,h}' - ss.header_dir = 'CSSLayout' + s.subspec 'yoga' do |ss| + ss.source_files = 'ReactCommon/yoga/**/*.{c,h}' + ss.header_dir = 'yoga' end s.subspec 'ART' do |ss| diff --git a/React/Base/RCTConvert.h b/React/Base/RCTConvert.h index 4197bb9bd..f725092c4 100644 --- a/React/Base/RCTConvert.h +++ b/React/Base/RCTConvert.h @@ -10,7 +10,7 @@ #import #import -#import +#import #import #import #import diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index cf5b3fae7..d52a6fda1 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -11,7 +11,7 @@ #import -#import +#import #import "RCTAccessibilityManager.h" #import "RCTAnimationType.h" diff --git a/React/React.xcodeproj/project.pbxproj b/React/React.xcodeproj/project.pbxproj index bd58bc024..1b1ad2de2 100644 --- a/React/React.xcodeproj/project.pbxproj +++ b/React/React.xcodeproj/project.pbxproj @@ -13,6 +13,14 @@ 008341F61D1DB34400876D9A /* RCTJSStackFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 008341F41D1DB34400876D9A /* RCTJSStackFrame.m */; }; 131B6AF41AF1093D00FFC3E0 /* RCTSegmentedControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6AF11AF1093D00FFC3E0 /* RCTSegmentedControl.m */; }; 131B6AF51AF1093D00FFC3E0 /* RCTSegmentedControlManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 131B6AF31AF1093D00FFC3E0 /* RCTSegmentedControlManager.m */; }; + 133957881DF76D3500EC27BE /* YGEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 130A77031DF767AF001F9587 /* YGEnums.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 133957891DF76D3500EC27BE /* YGMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 130A77041DF767AF001F9587 /* YGMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1339578A1DF76D3500EC27BE /* YGNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 130A77061DF767AF001F9587 /* YGNodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1339578B1DF76D3500EC27BE /* Yoga.h in Headers */ = {isa = PBXBuildFile; fileRef = 130A77081DF767AF001F9587 /* Yoga.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1339578C1DF76DB000EC27BE /* YGEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 130A77031DF767AF001F9587 /* YGEnums.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1339578D1DF76DB000EC27BE /* YGMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 130A77041DF767AF001F9587 /* YGMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1339578E1DF76DB000EC27BE /* YGNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 130A77061DF767AF001F9587 /* YGNodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1339578F1DF76DB000EC27BE /* Yoga.h in Headers */ = {isa = PBXBuildFile; fileRef = 130A77081DF767AF001F9587 /* Yoga.h */; settings = {ATTRIBUTES = (Public, ); }; }; 133CAE8E1B8E5CFD00F6AD92 /* RCTDatePicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 133CAE8D1B8E5CFD00F6AD92 /* RCTDatePicker.m */; }; 13456E931ADAD2DE009F94A7 /* RCTConvert+CoreLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 13456E921ADAD2DE009F94A7 /* RCTConvert+CoreLocation.m */; }; 13456E961ADAD482009F94A7 /* RCTConvert+MapKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 13456E951ADAD482009F94A7 /* RCTConvert+MapKit.m */; }; @@ -28,6 +36,8 @@ 13A0C28A1B74F71200B29F6F /* RCTDevMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A0C2881B74F71200B29F6F /* RCTDevMenu.m */; }; 13A1F71E1A75392D00D3D453 /* RCTKeyCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A1F71D1A75392D00D3D453 /* RCTKeyCommands.m */; }; 13A6E20E1C19AA0C00845B82 /* RCTParserUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 13A6E20D1C19AA0C00845B82 /* RCTParserUtils.m */; }; + 13AB5E011DF777F2001A8C30 /* YGNodeList.c in Sources */ = {isa = PBXBuildFile; fileRef = 130A77051DF767AF001F9587 /* YGNodeList.c */; }; + 13AB5E021DF777F2001A8C30 /* Yoga.c in Sources */ = {isa = PBXBuildFile; fileRef = 130A77071DF767AF001F9587 /* Yoga.c */; }; 13AB90C11B6FA36700713B4F /* RCTComponentData.m in Sources */ = {isa = PBXBuildFile; fileRef = 13AB90C01B6FA36700713B4F /* RCTComponentData.m */; }; 13AF20451AE707F9005F5298 /* RCTSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 13AF20441AE707F9005F5298 /* RCTSlider.m */; }; 13AFBCA01C07247D00BBAEAA /* RCTMapOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = 13AFBC9F1C07247D00BBAEAA /* RCTMapOverlay.m */; }; @@ -179,20 +189,8 @@ 3D1FA09A1DE4F50100E03CC6 /* RCTPushNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D1FA08D1DE4F4EE00E03CC6 /* RCTPushNotificationManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3D37B5821D522B190042D5B5 /* RCTFont.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3D37B5811D522B190042D5B5 /* RCTFont.mm */; }; 3D3C04AB1DE3337C00C268FA /* RCTAlertManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 13B07FE71A69327A00A75B9A /* RCTAlertManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D3C083B1DE334D900C268FA /* YGEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D10A3C81DDF3D16004A0F9D /* YGEnums.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D3C083C1DE334D900C268FA /* Yoga.h in Headers */ = {isa = PBXBuildFile; fileRef = 133683451D37ACA10077D0C3 /* Yoga.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D3C083D1DE334D900C268FA /* YGMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 133683481D37ACA10077D0C3 /* YGMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D3C083E1DE334D900C268FA /* YGNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1321C8CF1D3EB50800D58318 /* YGNodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D3C083F1DE334DA00C268FA /* YGEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D10A3C81DDF3D16004A0F9D /* YGEnums.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D3C08401DE334DA00C268FA /* Yoga.h in Headers */ = {isa = PBXBuildFile; fileRef = 133683451D37ACA10077D0C3 /* Yoga.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D3C08411DE334DA00C268FA /* YGMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 133683481D37ACA10077D0C3 /* YGMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D3C08421DE334DA00C268FA /* YGNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1321C8CF1D3EB50800D58318 /* YGNodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D3C085A1DE33E4400C268FA /* Yoga.c in Sources */ = {isa = PBXBuildFile; fileRef = 133683441D37ACA10077D0C3 /* Yoga.c */; }; - 3D3C085C1DE33E4E00C268FA /* Yoga.c in Sources */ = {isa = PBXBuildFile; fileRef = 133683441D37ACA10077D0C3 /* Yoga.c */; }; - 3D3C085E1DE33E6100C268FA /* YGNodeList.c in Sources */ = {isa = PBXBuildFile; fileRef = 1321C8CE1D3EB50800D58318 /* YGNodeList.c */; }; - 3D3C085F1DE33E6100C268FA /* YGNodeList.c in Sources */ = {isa = PBXBuildFile; fileRef = 1321C8CE1D3EB50800D58318 /* YGNodeList.c */; }; - 3D3C08891DE342FB00C268FA /* libCSSLayout.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D3C059A1DE3340900C268FA /* libCSSLayout.a */; }; - 3D3C088C1DE3430500C268FA /* libCSSLayout-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D3C06751DE3340C00C268FA /* libCSSLayout-tvOS.a */; }; + 3D3C08891DE342FB00C268FA /* libyoga.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D3C059A1DE3340900C268FA /* libyoga.a */; }; + 3D3C088C1DE3430500C268FA /* libyoga-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D3C06751DE3340C00C268FA /* libyoga-tvOS.a */; }; 3D3CD93D1DE5FC1400167DC4 /* JavaScriptCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D7A27DC1DE32541002E3F95 /* JavaScriptCore.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3D3CD93E1DE5FC1400167DC4 /* JSCWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D7A27DE1DE32541002E3F95 /* JSCWrapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3D3CD93F1DE5FC1400167DC4 /* JavaScriptCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D7A27DC1DE32541002E3F95 /* JavaScriptCore.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -476,7 +474,7 @@ containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; proxyType = 1; remoteGlobalIDString = 3D3C059B1DE3340C00C268FA; - remoteInfo = "CSSLayout-tvOS"; + remoteInfo = "yoga-tvOS"; }; 3D0574561DE5FF9600184BB4 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -497,7 +495,7 @@ containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; proxyType = 1; remoteGlobalIDString = 3D3C04B91DE3340900C268FA; - remoteInfo = CSSLayout; + remoteInfo = yoga; }; 3D3CD94B1DE5FCE700167DC4 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -531,15 +529,16 @@ 006FC4131D9B20820057AAAD /* RCTMultipartDataTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTMultipartDataTask.m; sourceTree = ""; }; 008341F41D1DB34400876D9A /* RCTJSStackFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTJSStackFrame.m; sourceTree = ""; }; 008341F51D1DB34400876D9A /* RCTJSStackFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTJSStackFrame.h; sourceTree = ""; }; + 130A77031DF767AF001F9587 /* YGEnums.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YGEnums.h; sourceTree = ""; }; + 130A77041DF767AF001F9587 /* YGMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YGMacros.h; sourceTree = ""; }; + 130A77051DF767AF001F9587 /* YGNodeList.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = YGNodeList.c; sourceTree = ""; }; + 130A77061DF767AF001F9587 /* YGNodeList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YGNodeList.h; sourceTree = ""; }; + 130A77071DF767AF001F9587 /* Yoga.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = Yoga.c; sourceTree = ""; }; + 130A77081DF767AF001F9587 /* Yoga.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Yoga.h; sourceTree = ""; }; 131B6AF01AF1093D00FFC3E0 /* RCTSegmentedControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTSegmentedControl.h; sourceTree = ""; }; 131B6AF11AF1093D00FFC3E0 /* RCTSegmentedControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTSegmentedControl.m; sourceTree = ""; }; 131B6AF21AF1093D00FFC3E0 /* RCTSegmentedControlManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTSegmentedControlManager.h; sourceTree = ""; }; 131B6AF31AF1093D00FFC3E0 /* RCTSegmentedControlManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTSegmentedControlManager.m; sourceTree = ""; }; - 1321C8CE1D3EB50800D58318 /* YGNodeList.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = YGNodeList.c; sourceTree = ""; }; - 1321C8CF1D3EB50800D58318 /* YGNodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGNodeList.h; sourceTree = ""; }; - 133683441D37ACA10077D0C3 /* Yoga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Yoga.c; sourceTree = ""; }; - 133683451D37ACA10077D0C3 /* Yoga.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Yoga.h; sourceTree = ""; }; - 133683481D37ACA10077D0C3 /* YGMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGMacros.h; sourceTree = ""; }; 133CAE8C1B8E5CFD00F6AD92 /* RCTDatePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTDatePicker.h; sourceTree = ""; }; 133CAE8D1B8E5CFD00F6AD92 /* RCTDatePicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTDatePicker.m; sourceTree = ""; }; 13442BF21AA90E0B0037E5B0 /* RCTAnimationType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTAnimationType.h; sourceTree = ""; }; @@ -685,7 +684,6 @@ 369123E01DDC75850095B341 /* JSCSamplingProfiler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSCSamplingProfiler.m; sourceTree = ""; }; 391E86A21C623EC800009732 /* RCTTouchEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTTouchEvent.m; sourceTree = ""; }; 391E86A31C623EC800009732 /* RCTTouchEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTTouchEvent.h; sourceTree = ""; }; - 3D10A3C81DDF3D16004A0F9D /* YGEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGEnums.h; sourceTree = ""; }; 3D1E68D81CABD13900DD7465 /* RCTDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTDisplayLink.h; sourceTree = ""; }; 3D1E68D91CABD13900DD7465 /* RCTDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTDisplayLink.m; sourceTree = ""; }; 3D1FA07A1DE4F2EA00E03CC6 /* RCTNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTNetworking.h; sourceTree = ""; }; @@ -697,8 +695,8 @@ 3D1FA08D1DE4F4EE00E03CC6 /* RCTPushNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTPushNotificationManager.h; path = PushNotificationIOS/RCTPushNotificationManager.h; sourceTree = ""; }; 3D37B5801D522B190042D5B5 /* RCTFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RCTFont.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 3D37B5811D522B190042D5B5 /* RCTFont.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RCTFont.mm; sourceTree = ""; }; - 3D3C059A1DE3340900C268FA /* libCSSLayout.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCSSLayout.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 3D3C06751DE3340C00C268FA /* libCSSLayout-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libCSSLayout-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3D3C059A1DE3340900C268FA /* libyoga.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libyoga.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3D3C06751DE3340C00C268FA /* libyoga-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libyoga-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 3D3CD8F51DE5FB2300167DC4 /* JSBundleType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBundleType.h; sourceTree = ""; }; 3D3CD90B1DE5FBD600167DC4 /* libjschelpers.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjschelpers.a; sourceTree = BUILT_PRODUCTS_DIR; }; 3D3CD9181DE5FBD800167DC4 /* libjschelpers-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libjschelpers-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -775,7 +773,7 @@ files = ( 3D3CD9411DE5FC5300167DC4 /* libcxxreact.a in Frameworks */, 3D3CD9421DE5FC5300167DC4 /* libjschelpers.a in Frameworks */, - 3D3C08891DE342FB00C268FA /* libCSSLayout.a in Frameworks */, + 3D3C08891DE342FB00C268FA /* libyoga.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -785,25 +783,25 @@ files = ( 3D3CD9431DE5FC6500167DC4 /* libcxxreact-tvOS.a in Frameworks */, 3D3CD9441DE5FC6500167DC4 /* libjschelpers-tvOS.a in Frameworks */, - 3D3C088C1DE3430500C268FA /* libCSSLayout-tvOS.a in Frameworks */, + 3D3C088C1DE3430500C268FA /* libyoga-tvOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 133683431D37ACA10077D0C3 /* CSSLayout */ = { + 130A77021DF767AF001F9587 /* yoga */ = { isa = PBXGroup; children = ( - 3D10A3C81DDF3D16004A0F9D /* YGEnums.h */, - 133683441D37ACA10077D0C3 /* Yoga.c */, - 133683451D37ACA10077D0C3 /* Yoga.h */, - 133683481D37ACA10077D0C3 /* YGMacros.h */, - 1321C8CE1D3EB50800D58318 /* YGNodeList.c */, - 1321C8CF1D3EB50800D58318 /* YGNodeList.h */, + 130A77031DF767AF001F9587 /* YGEnums.h */, + 130A77041DF767AF001F9587 /* YGMacros.h */, + 130A77051DF767AF001F9587 /* YGNodeList.c */, + 130A77061DF767AF001F9587 /* YGNodeList.h */, + 130A77071DF767AF001F9587 /* Yoga.c */, + 130A77081DF767AF001F9587 /* Yoga.h */, ); - name = CSSLayout; - path = CSSLayout/CSSLayout; + name = yoga; + path = yoga/yoga; sourceTree = ""; }; 134FCB381A6E7F0800051CC8 /* Executors */ = { @@ -988,7 +986,7 @@ 3D10A3C71DDF3CED004A0F9D /* ReactCommon */ = { isa = PBXGroup; children = ( - 133683431D37ACA10077D0C3 /* CSSLayout */, + 130A77021DF767AF001F9587 /* yoga */, AC70D2EA1DE489FC002E6351 /* cxxreact */, 3D4A621D1DDD3985001F41B4 /* jschelpers */, ); @@ -1070,8 +1068,8 @@ children = ( 83CBBA2E1A601D0E00E9B192 /* libReact.a */, 2D2A28131D9B038B00D4039D /* libReact-tvOS.a */, - 3D3C059A1DE3340900C268FA /* libCSSLayout.a */, - 3D3C06751DE3340C00C268FA /* libCSSLayout-tvOS.a */, + 3D3C059A1DE3340900C268FA /* libyoga.a */, + 3D3C06751DE3340C00C268FA /* libyoga-tvOS.a */, 3D3CD90B1DE5FBD600167DC4 /* libjschelpers.a */, 3D3CD9181DE5FBD800167DC4 /* libjschelpers-tvOS.a */, 3D3CD9251DE5FBEC00167DC4 /* libcxxreact.a */, @@ -1180,10 +1178,10 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 3D3C083D1DE334D900C268FA /* YGMacros.h in Headers */, - 3D3C083C1DE334D900C268FA /* Yoga.h in Headers */, - 3D3C083E1DE334D900C268FA /* YGNodeList.h in Headers */, - 3D3C083B1DE334D900C268FA /* YGEnums.h in Headers */, + 133957881DF76D3500EC27BE /* YGEnums.h in Headers */, + 1339578B1DF76D3500EC27BE /* Yoga.h in Headers */, + 1339578A1DF76D3500EC27BE /* YGNodeList.h in Headers */, + 133957891DF76D3500EC27BE /* YGMacros.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1191,10 +1189,10 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 3D3C08411DE334DA00C268FA /* YGMacros.h in Headers */, - 3D3C08401DE334DA00C268FA /* Yoga.h in Headers */, - 3D3C08421DE334DA00C268FA /* YGNodeList.h in Headers */, - 3D3C083F1DE334DA00C268FA /* YGEnums.h in Headers */, + 1339578C1DF76DB000EC27BE /* YGEnums.h in Headers */, + 1339578D1DF76DB000EC27BE /* YGMacros.h in Headers */, + 1339578E1DF76DB000EC27BE /* YGNodeList.h in Headers */, + 1339578F1DF76DB000EC27BE /* Yoga.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1521,9 +1519,9 @@ productReference = 2D2A28131D9B038B00D4039D /* libReact-tvOS.a */; productType = "com.apple.product-type.library.static"; }; - 3D3C04B91DE3340900C268FA /* CSSLayout */ = { + 3D3C04B91DE3340900C268FA /* yoga */ = { isa = PBXNativeTarget; - buildConfigurationList = 3D3C05971DE3340900C268FA /* Build configuration list for PBXNativeTarget "CSSLayout" */; + buildConfigurationList = 3D3C05971DE3340900C268FA /* Build configuration list for PBXNativeTarget "yoga" */; buildPhases = ( 3D3C04BB1DE3340900C268FA /* Headers */, 3D3C05301DE3340900C268FA /* Sources */, @@ -1532,14 +1530,14 @@ ); dependencies = ( ); - name = CSSLayout; + name = yoga; productName = React; - productReference = 3D3C059A1DE3340900C268FA /* libCSSLayout.a */; + productReference = 3D3C059A1DE3340900C268FA /* libyoga.a */; productType = "com.apple.product-type.library.static"; }; - 3D3C059B1DE3340C00C268FA /* CSSLayout-tvOS */ = { + 3D3C059B1DE3340C00C268FA /* yoga-tvOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 3D3C06721DE3340C00C268FA /* Build configuration list for PBXNativeTarget "CSSLayout-tvOS" */; + buildConfigurationList = 3D3C06721DE3340C00C268FA /* Build configuration list for PBXNativeTarget "yoga-tvOS" */; buildPhases = ( 3D3C059D1DE3340C00C268FA /* Headers */, 3D3C06181DE3340C00C268FA /* Sources */, @@ -1548,9 +1546,9 @@ ); dependencies = ( ); - name = "CSSLayout-tvOS"; + name = "yoga-tvOS"; productName = "React-tvOS"; - productReference = 3D3C06751DE3340C00C268FA /* libCSSLayout-tvOS.a */; + productReference = 3D3C06751DE3340C00C268FA /* libyoga-tvOS.a */; productType = "com.apple.product-type.library.static"; }; 3D3CD8FF1DE5FBD600167DC4 /* jschelpers */ = { @@ -1673,8 +1671,8 @@ targets = ( 83CBBA2D1A601D0E00E9B192 /* React */, 2D2A28121D9B038B00D4039D /* React-tvOS */, - 3D3C04B91DE3340900C268FA /* CSSLayout */, - 3D3C059B1DE3340C00C268FA /* CSSLayout-tvOS */, + 3D3C04B91DE3340900C268FA /* yoga */, + 3D3C059B1DE3340C00C268FA /* yoga-tvOS */, 3D3CD9191DE5FBEC00167DC4 /* cxxreact */, 3D3CD9261DE5FBEE00167DC4 /* cxxreact-tvOS */, 3D3CD8FF1DE5FBD600167DC4 /* jschelpers */, @@ -1840,8 +1838,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3D3C085A1DE33E4400C268FA /* Yoga.c in Sources */, - 3D3C085E1DE33E6100C268FA /* YGNodeList.c in Sources */, + 13AB5E011DF777F2001A8C30 /* YGNodeList.c in Sources */, + 13AB5E021DF777F2001A8C30 /* Yoga.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1849,8 +1847,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3D3C085C1DE33E4E00C268FA /* Yoga.c in Sources */, - 3D3C085F1DE33E6100C268FA /* YGNodeList.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1996,7 +1992,7 @@ /* Begin PBXTargetDependency section */ 3D0574551DE5FF9600184BB4 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 3D3C059B1DE3340C00C268FA /* CSSLayout-tvOS */; + target = 3D3C059B1DE3340C00C268FA /* yoga-tvOS */; targetProxy = 3D0574541DE5FF9600184BB4 /* PBXContainerItemProxy */; }; 3D0574571DE5FF9600184BB4 /* PBXTargetDependency */ = { @@ -2011,7 +2007,7 @@ }; 3D3CD94A1DE5FCE700167DC4 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 3D3C04B91DE3340900C268FA /* CSSLayout */; + target = 3D3C04B91DE3340900C268FA /* yoga */; targetProxy = 3D3CD9491DE5FCE700167DC4 /* PBXContainerItemProxy */; }; 3D3CD94C1DE5FCE700167DC4 /* PBXTargetDependency */ = { @@ -2085,7 +2081,7 @@ GCC_WARN_ABOUT_MISSING_NEWLINE = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; - PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/CSSLayout; + PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/yoga; RUN_CLANG_STATIC_ANALYZER = YES; SKIP_INSTALL = YES; }; @@ -2100,7 +2096,7 @@ GCC_WARN_ABOUT_MISSING_NEWLINE = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; - PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/CSSLayout; + PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/yoga; RUN_CLANG_STATIC_ANALYZER = NO; SKIP_INSTALL = YES; }; @@ -2123,7 +2119,7 @@ ); OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; - PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/CSSLayout; + PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/yoga; SDKROOT = appletvos; SKIP_INSTALL = YES; TVOS_DEPLOYMENT_TARGET = 9.2; @@ -2143,7 +2139,7 @@ GCC_NO_COMMON_BLOCKS = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; - PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/CSSLayout; + PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/yoga; SDKROOT = appletvos; SKIP_INSTALL = YES; TVOS_DEPLOYMENT_TARGET = 9.2; @@ -2438,7 +2434,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 3D3C05971DE3340900C268FA /* Build configuration list for PBXNativeTarget "CSSLayout" */ = { + 3D3C05971DE3340900C268FA /* Build configuration list for PBXNativeTarget "yoga" */ = { isa = XCConfigurationList; buildConfigurations = ( 3D3C05981DE3340900C268FA /* Debug */, @@ -2447,7 +2443,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 3D3C06721DE3340C00C268FA /* Build configuration list for PBXNativeTarget "CSSLayout-tvOS" */ = { + 3D3C06721DE3340C00C268FA /* Build configuration list for PBXNativeTarget "yoga-tvOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 3D3C06731DE3340C00C268FA /* Debug */, diff --git a/React/Views/RCTShadowView.h b/React/Views/RCTShadowView.h index 3daeb22fc..d9b5667cf 100644 --- a/React/Views/RCTShadowView.h +++ b/React/Views/RCTShadowView.h @@ -9,7 +9,7 @@ #import -#import +#import #import #import diff --git a/ReactAndroid/DEFS b/ReactAndroid/DEFS index f98dcc789..872f103e9 100644 --- a/ReactAndroid/DEFS +++ b/ReactAndroid/DEFS @@ -35,7 +35,7 @@ JSC_DEPS = [ '//native/third-party/jsc:jsc_legacy_profiler', ] -CSSLAYOUT_TARGET = '//ReactAndroid/src/main/java/com/facebook:csslayout' +YOGA_TARGET = '//ReactAndroid/src/main/java/com/facebook:yoga' FBGLOGINIT_TARGET = '//ReactAndroid/src/main/jni/first-party/fbgloginit:fbgloginit' FBJNI_TARGET = '//ReactAndroid/src/main/jni/first-party/fb:jni' JNI_TARGET = '//ReactAndroid/src/main/jni/first-party/jni-hack:jni-hack' @@ -103,14 +103,14 @@ def rn_robolectric_test(name, srcs, vm_args = None, *args, **kwargs): 'buck-out/bin')) # RN tests use Powermock, which means they get their own ClassLoaders. - # Because the csslayout native library (or any native library) can only be loaded into one + # Because the yoga native library (or any native library) can only be loaded into one # ClassLoader at a time, we need to run each in its own process, hence fork_mode = 'per_test'. robolectric_test( name = name, use_cxx_libraries = True, cxx_library_whitelist = [ - '//ReactCommon/CSSLayout:CSSLayout', - '//ReactAndroid/src/main/jni/first-party/csslayoutjni:jni', + '//ReactCommon/yoga:yoga', + '//ReactAndroid/src/main/jni/first-party/yogajni:jni', ], fork_mode = 'per_test', srcs = srcs, diff --git a/ReactAndroid/src/main/java/com/facebook/BUCK b/ReactAndroid/src/main/java/com/facebook/BUCK index 01c15cefd..639fb6bc6 100644 --- a/ReactAndroid/src/main/java/com/facebook/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/BUCK @@ -1,8 +1,8 @@ include_defs('//ReactAndroid/DEFS') android_library( - name = 'csslayout', - srcs = glob(['csslayout/*.java']), + name = 'yoga', + srcs = glob(['yoga/*.java']), deps = [ react_native_dep('java/com/facebook/proguard/annotations:annotations'), react_native_dep('libraries/soloader/java/com/facebook/soloader:soloader'), @@ -13,5 +13,5 @@ android_library( ) project_config( - src_target = ':csslayout', + src_target = ':yoga', ) diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/README b/ReactAndroid/src/main/java/com/facebook/csslayout/README deleted file mode 100644 index 9d85b26ff..000000000 --- a/ReactAndroid/src/main/java/com/facebook/csslayout/README +++ /dev/null @@ -1,15 +0,0 @@ -The source of truth for css-layout is: https://github.com/facebook/css-layout - -The code here should be kept in sync with GitHub. -HEAD at the time this code was synced: https://github.com/facebook/css-layout/commit/a1f36b53f5464c8ee7abc311765dc3ecb1b879c6 - -There is generated code in: - - README (this file) - - fbandroid/java/com/facebook/csslayout - - fbandroid/javatests/com/facebook/csslayout - - fbobjc/Libraries/FBReactKit/js/react-native-github/React/Layout - -The code was generated by running 'make' in the css-layout folder and running: - - scripts/sync-css-layout.sh - diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK index 1c4d06fe9..1b3db6f91 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK @@ -9,7 +9,7 @@ android_library( 'layoutanimation/*.java' ]), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('java/com/facebook/systrace:systrace'), react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'), react_native_dep('third-party/android/support/v4:lib-support-v4'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java index c09fc3869..3959ce1e8 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java @@ -659,7 +659,7 @@ public class ReactShadowNode { if ((measureFunction == null ^ mYogaNode.isMeasureDefined()) && getChildCount() != 0) { throw new RuntimeException( - "Since a node with a measure function does not add any native CSSLayout children, it's " + + "Since a node with a measure function does not add any native yoga children, it's " + "not safe to transition to/from having a measure function unless a node has no children"); } mYogaNode.setMeasureFunction(measureFunction); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/art/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/art/BUCK index 80a26288b..adea86b7c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/art/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/art/BUCK @@ -4,7 +4,7 @@ android_library( name = 'art', srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'), react_native_dep('third-party/java/jsr-305:jsr-305'), react_native_target('java/com/facebook/react/bridge:bridge'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK index df5cef585..53600c545 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK @@ -4,7 +4,7 @@ android_library( name = 'drawer', srcs = glob(['**/*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'), react_native_dep('third-party/android/support/v4:lib-support-v4'), react_native_dep('third-party/java/jsr-305:jsr-305'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK index 2d9693cd5..033927b29 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK @@ -24,7 +24,7 @@ android_library( ':imageevents', ], deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('libraries/fresco/fresco-react-native:fbcore'), react_native_dep('libraries/fresco/fresco-react-native:fresco-drawee'), react_native_dep('libraries/fresco/fresco-react-native:fresco-react-native'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/modal/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/modal/BUCK index 9b77f8d17..a4bc552a9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/modal/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/modal/BUCK @@ -4,7 +4,7 @@ android_library( name = 'modal', srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('third-party/java/infer-annotations:infer-annotations'), react_native_dep('third-party/java/jsr-305:jsr-305'), react_native_target('java/com/facebook/react/bridge:bridge'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK index ba497182c..a2b4913d0 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK @@ -4,7 +4,7 @@ android_library( name = 'progressbar', srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('third-party/java/infer-annotations:infer-annotations'), react_native_dep('third-party/java/jsr-305:jsr-305'), react_native_target('java/com/facebook/react/bridge:bridge'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/slider/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/slider/BUCK index a6c5ecaf3..81727b34f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/slider/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/slider/BUCK @@ -4,7 +4,7 @@ android_library( name = 'slider', srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('android_res/android/support/v7/appcompat-orig:res-for-react-native'), react_native_dep('third-party/android/support/v7/appcompat-orig:appcompat'), react_native_dep('third-party/java/jsr-305:jsr-305'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK index 5a0e842f5..5a3f93b24 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK @@ -4,7 +4,7 @@ android_library( name = 'switchview', srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('third-party/android/support/v7/appcompat-orig:appcompat'), react_native_dep('third-party/java/jsr-305:jsr-305'), react_native_target('java/com/facebook/react/bridge:bridge'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK index 50c131997..486ca55cf 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK @@ -4,7 +4,7 @@ android_library( name = 'text', srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('third-party/java/infer-annotations:infer-annotations'), react_native_dep('third-party/java/jsr-305:jsr-305'), react_native_target('java/com/facebook/react/bridge:bridge'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/BUCK index 93742aa1c..c74178993 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/BUCK @@ -4,7 +4,7 @@ android_library( name = 'frescosupport', srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('libraries/fresco/fresco-react-native:fbcore'), react_native_dep('libraries/fresco/fresco-react-native:fresco-drawee'), react_native_dep('libraries/fresco/fresco-react-native:fresco-react-native'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK index 63c532ced..763e57b6e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK @@ -4,7 +4,7 @@ android_library( name = 'textinput', srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('third-party/java/infer-annotations:infer-annotations'), react_native_dep('third-party/java/jsr-305:jsr-305'), react_native_target('java/com/facebook/react/bridge:bridge'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/BUCK index 4c0a41bee..8759c3123 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/BUCK @@ -4,7 +4,7 @@ android_library( name = 'toolbar', srcs = glob(['**/*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('android_res/android/support/v7/appcompat-orig:res-for-react-native'), react_native_dep('libraries/fresco/fresco-react-native:fresco-drawee'), react_native_dep('libraries/fresco/fresco-react-native:fresco-react-native'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK index b7804ef56..28f59a63c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK @@ -4,7 +4,7 @@ android_library( name = 'view', srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('third-party/java/infer-annotations:infer-annotations'), react_native_dep('third-party/java/jsr-305:jsr-305'), react_native_target('java/com/facebook/react/bridge:bridge'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java index c5a2ea12f..7ed365571 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java @@ -42,7 +42,7 @@ public class ReactViewPager extends ViewPager { // We need to do that since {@link ViewPager} relies on layout passes to position those views // in a right way (also thanks to {@link ReactViewPagerManager#needsCustomLayoutForChildren} // returning {@code true}). Currently we only call {@link View#measure} and - // {@link View#layout} after CSSLayout step. + // {@link View#layout} after yoga step. // TODO(7323049): Remove this workaround once we figure out a way to re-layout some views on // request diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaAlign.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaAlign.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaAlign.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaAlign.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaConstants.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaConstants.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaConstants.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaConstants.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaDimension.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaDimension.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaDimension.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaDimension.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaDirection.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaDirection.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaDirection.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaDirection.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaEdge.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaEdge.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaEdge.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaEdge.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaExperimentalFeature.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaExperimentalFeature.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaFlexDirection.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaFlexDirection.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaFlexDirection.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaFlexDirection.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaJustify.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaJustify.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaJustify.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaJustify.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaLogLevel.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaLogLevel.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaLogLevel.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaLogLevel.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaLogger.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaLogger.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaLogger.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaLogger.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaMeasureFunction.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureFunction.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaMeasureFunction.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureFunction.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaMeasureMode.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureMode.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaMeasureMode.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureMode.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaMeasureOutput.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureOutput.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaMeasureOutput.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureOutput.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaNode.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaNode.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaNodeAPI.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeAPI.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaNodeAPI.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeAPI.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaOverflow.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaOverflow.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaOverflow.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaOverflow.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaPositionType.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaPositionType.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaPositionType.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaPositionType.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaPrintOptions.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaPrintOptions.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaPrintOptions.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaPrintOptions.java diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/YogaWrap.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.java similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/csslayout/YogaWrap.java rename to ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.java diff --git a/ReactAndroid/src/main/jni/first-party/csslayoutjni/Android.mk b/ReactAndroid/src/main/jni/first-party/yogajni/Android.mk similarity index 93% rename from ReactAndroid/src/main/jni/first-party/csslayoutjni/Android.mk rename to ReactAndroid/src/main/jni/first-party/yogajni/Android.mk index 035e2972d..908cd43e6 100644 --- a/ReactAndroid/src/main/jni/first-party/csslayoutjni/Android.mk +++ b/ReactAndroid/src/main/jni/first-party/yogajni/Android.mk @@ -20,5 +20,5 @@ LOCAL_SHARED_LIBRARIES := libfb include $(BUILD_SHARED_LIBRARY) -$(call import-module,CSSLayout) +$(call import-module,yoga) $(call import-module,fb) diff --git a/ReactAndroid/src/main/jni/first-party/csslayoutjni/BUCK b/ReactAndroid/src/main/jni/first-party/yogajni/BUCK similarity index 91% rename from ReactAndroid/src/main/jni/first-party/csslayoutjni/BUCK rename to ReactAndroid/src/main/jni/first-party/yogajni/BUCK index 8f1348719..319265e8f 100644 --- a/ReactAndroid/src/main/jni/first-party/csslayoutjni/BUCK +++ b/ReactAndroid/src/main/jni/first-party/yogajni/BUCK @@ -16,7 +16,7 @@ if IS_OSS_BUILD: '-std=c++11', ], deps = [ - '//ReactCommon/CSSLayout:CSSLayout', + '//ReactCommon/yoga:yoga', FBJNI_TARGET, ], visibility = ['PUBLIC'], diff --git a/ReactAndroid/src/main/jni/first-party/csslayoutjni/jni/YGJNI.cpp b/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNI.cpp similarity index 99% rename from ReactAndroid/src/main/jni/first-party/csslayoutjni/jni/YGJNI.cpp rename to ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNI.cpp index 2e9fd99db..bf17f087c 100644 --- a/ReactAndroid/src/main/jni/first-party/csslayoutjni/jni/YGJNI.cpp +++ b/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNI.cpp @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -#include +#include #include #include diff --git a/ReactAndroid/src/main/jni/xreact/jni/Android.mk b/ReactAndroid/src/main/jni/xreact/jni/Android.mk index d2b0b0f0c..49d282ad8 100644 --- a/ReactAndroid/src/main/jni/xreact/jni/Android.mk +++ b/ReactAndroid/src/main/jni/xreact/jni/Android.mk @@ -44,4 +44,4 @@ $(call import-module,jsc) $(call import-module,folly) $(call import-module,fbgloginit) $(call import-module,jsc) -$(call import-module,csslayoutjni) +$(call import-module,yogajni) diff --git a/ReactAndroid/src/test/java/com/facebook/react/BUCK b/ReactAndroid/src/test/java/com/facebook/react/BUCK index 4a76ac6c5..a5736dccb 100644 --- a/ReactAndroid/src/test/java/com/facebook/react/BUCK +++ b/ReactAndroid/src/test/java/com/facebook/react/BUCK @@ -6,7 +6,7 @@ rn_robolectric_test( contacts = ['oncall+fbandroid_sheriff@xmail.facebook.com'], srcs = glob(['*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('libraries/fbcore/src/test/java/com/facebook/powermock:powermock'), react_native_dep('third-party/java/fest:fest'), react_native_dep('third-party/java/jsr-305:jsr-305'), diff --git a/ReactAndroid/src/test/java/com/facebook/react/modules/BUCK b/ReactAndroid/src/test/java/com/facebook/react/modules/BUCK index d5dfa2418..a86f86010 100644 --- a/ReactAndroid/src/test/java/com/facebook/react/modules/BUCK +++ b/ReactAndroid/src/test/java/com/facebook/react/modules/BUCK @@ -6,7 +6,7 @@ rn_robolectric_test( name = 'modules', srcs = glob(['**/*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('libraries/fbcore/src/test/java/com/facebook/powermock:powermock'), react_native_dep('third-party/java/fest:fest'), react_native_dep('third-party/java/jsr-305:jsr-305'), diff --git a/ReactAndroid/src/test/java/com/facebook/react/uimanager/BUCK b/ReactAndroid/src/test/java/com/facebook/react/uimanager/BUCK index 3b994d6fb..d0e94ca9a 100644 --- a/ReactAndroid/src/test/java/com/facebook/react/uimanager/BUCK +++ b/ReactAndroid/src/test/java/com/facebook/react/uimanager/BUCK @@ -6,7 +6,7 @@ rn_robolectric_test( contacts = ['oncall+fbandroid_sheriff@xmail.facebook.com'], srcs = glob(['**/*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('libraries/fbcore/src/test/java/com/facebook/powermock:powermock'), react_native_dep('third-party/java/fest:fest'), react_native_dep('third-party/java/jsr-305:jsr-305'), diff --git a/ReactAndroid/src/test/java/com/facebook/react/views/BUCK b/ReactAndroid/src/test/java/com/facebook/react/views/BUCK index 021c3537d..882598ffa 100644 --- a/ReactAndroid/src/test/java/com/facebook/react/views/BUCK +++ b/ReactAndroid/src/test/java/com/facebook/react/views/BUCK @@ -6,7 +6,7 @@ rn_robolectric_test( contacts = ['oncall+fbandroid_sheriff@xmail.facebook.com'], srcs = glob(['**/*.java']), deps = [ - CSSLAYOUT_TARGET, + YOGA_TARGET, react_native_dep('libraries/fbcore/src/test/java/com/facebook/powermock:powermock'), react_native_dep('libraries/fresco/fresco-react-native:fresco-drawee'), react_native_dep('libraries/fresco/fresco-react-native:fresco-react-native'), diff --git a/ReactCommon/CSSLayout/Android.mk b/ReactCommon/yoga/Android.mk similarity index 85% rename from ReactCommon/CSSLayout/Android.mk rename to ReactCommon/yoga/Android.mk index ad431ba5a..6d6219800 100644 --- a/ReactCommon/CSSLayout/Android.mk +++ b/ReactCommon/yoga/Android.mk @@ -5,8 +5,8 @@ include $(CLEAR_VARS) LOCAL_MODULE := yogacore LOCAL_SRC_FILES := \ - CSSLayout/Yoga.c \ - CSSLayout/YGNodeList.c + yoga/Yoga.c \ + yoga/YGNodeList.c LOCAL_C_INCLUDES := $(LOCAL_PATH) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) diff --git a/ReactCommon/CSSLayout/BUCK b/ReactCommon/yoga/BUCK similarity index 70% rename from ReactCommon/CSSLayout/BUCK rename to ReactCommon/yoga/BUCK index d03bab136..48a8f36f5 100644 --- a/ReactCommon/CSSLayout/BUCK +++ b/ReactCommon/yoga/BUCK @@ -1,7 +1,7 @@ cxx_library( - name = 'CSSLayout', + name = 'yoga', force_static = True, - srcs = glob(['CSSLayout/*.c']), + srcs = glob(['yoga/*.c']), header_namespace = '', compiler_flags = [ '-fno-omit-frame-pointer', @@ -11,7 +11,7 @@ cxx_library( '-std=c99', '-O3', ], - exported_headers = glob(['CSSLayout/*.h']), + exported_headers = glob(['yoga/*.h']), deps = [ ], visibility = ['PUBLIC'], diff --git a/ReactCommon/CSSLayout/CSSLayout/YGEnums.h b/ReactCommon/yoga/yoga/YGEnums.h similarity index 100% rename from ReactCommon/CSSLayout/CSSLayout/YGEnums.h rename to ReactCommon/yoga/yoga/YGEnums.h diff --git a/ReactCommon/CSSLayout/CSSLayout/YGMacros.h b/ReactCommon/yoga/yoga/YGMacros.h similarity index 100% rename from ReactCommon/CSSLayout/CSSLayout/YGMacros.h rename to ReactCommon/yoga/yoga/YGMacros.h diff --git a/ReactCommon/CSSLayout/CSSLayout/YGNodeList.c b/ReactCommon/yoga/yoga/YGNodeList.c similarity index 100% rename from ReactCommon/CSSLayout/CSSLayout/YGNodeList.c rename to ReactCommon/yoga/yoga/YGNodeList.c diff --git a/ReactCommon/CSSLayout/CSSLayout/YGNodeList.h b/ReactCommon/yoga/yoga/YGNodeList.h similarity index 100% rename from ReactCommon/CSSLayout/CSSLayout/YGNodeList.h rename to ReactCommon/yoga/yoga/YGNodeList.h diff --git a/ReactCommon/CSSLayout/CSSLayout/Yoga.c b/ReactCommon/yoga/yoga/Yoga.c similarity index 99% rename from ReactCommon/CSSLayout/CSSLayout/Yoga.c rename to ReactCommon/yoga/yoga/Yoga.c index 32d7e4890..29acb4599 100644 --- a/ReactCommon/CSSLayout/CSSLayout/Yoga.c +++ b/ReactCommon/yoga/yoga/Yoga.c @@ -2653,21 +2653,21 @@ inline bool YGIsExperimentalFeatureEnabled(YGExperimentalFeature feature) { return experimentalFeatures[feature]; } -void YGSetMemoryFuncs(YGMalloc YGMalloc, YGCalloc YGCalloc, YGRealloc YGRealloc, YGFree YGFree) { +void YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree) { YG_ASSERT(gNodeInstanceCount == 0, "Cannot set memory functions: all node must be freed first"); - YG_ASSERT((YGMalloc == NULL && YGCalloc == NULL && YGRealloc == NULL && YGFree == NULL) || - (YGMalloc != NULL && YGCalloc != NULL && YGRealloc != NULL && YGFree != NULL), + YG_ASSERT((ygmalloc == NULL && yccalloc == NULL && ygrealloc == NULL && ygfree == NULL) || + (ygmalloc != NULL && yccalloc != NULL && ygrealloc != NULL && ygfree != NULL), "Cannot set memory functions: functions must be all NULL or Non-NULL"); - if (YGMalloc == NULL || YGCalloc == NULL || YGRealloc == NULL || YGFree == NULL) { + if (ygmalloc == NULL || yccalloc == NULL || ygrealloc == NULL || ygfree == NULL) { gYGMalloc = &malloc; gYGCalloc = &calloc; gYGRealloc = &realloc; gYGFree = &free; } else { - gYGMalloc = YGMalloc; - gYGCalloc = YGCalloc; - gYGRealloc = YGRealloc; - gYGFree = YGFree; + gYGMalloc = ygmalloc; + gYGCalloc = yccalloc; + gYGRealloc = ygrealloc; + gYGFree = ygfree; } } diff --git a/ReactCommon/CSSLayout/CSSLayout/Yoga.h b/ReactCommon/yoga/yoga/Yoga.h similarity index 98% rename from ReactCommon/CSSLayout/CSSLayout/Yoga.h rename to ReactCommon/yoga/yoga/Yoga.h index e41a4cd95..c7bc600df 100644 --- a/ReactCommon/CSSLayout/CSSLayout/Yoga.h +++ b/ReactCommon/yoga/yoga/Yoga.h @@ -175,6 +175,6 @@ WIN_EXPORT void YGSetExperimentalFeatureEnabled(YGExperimentalFeature feature, b WIN_EXPORT bool YGIsExperimentalFeatureEnabled(YGExperimentalFeature feature); WIN_EXPORT void -YGSetMemoryFuncs(YGMalloc cssMalloc, YGCalloc cssCalloc, YGRealloc cssRealloc, YGFree cssFree); +YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree); YG_EXTERN_C_END diff --git a/scripts/sync-css-layout.sh b/scripts/sync-css-layout.sh index e6c6c803b..8b0ce3c31 100755 --- a/scripts/sync-css-layout.sh +++ b/scripts/sync-css-layout.sh @@ -6,21 +6,21 @@ function usage { function patchfile { # Add React Native copyright - printf "/**\n" > /tmp/csslayoutsync.tmp - printf " * Copyright (c) 2014-present, Facebook, Inc.\n" >> /tmp/csslayoutsync.tmp - printf " * All rights reserved.\n" >> /tmp/csslayoutsync.tmp - printf " * This source code is licensed under the BSD-style license found in the\n" >> /tmp/csslayoutsync.tmp - printf " * LICENSE file in the root directory of this source tree. An additional grant\n" >> /tmp/csslayoutsync.tmp - printf " * of patent rights can be found in the PATENTS file in the same directory.\n" >> /tmp/csslayoutsync.tmp - printf " */\n\n" >> /tmp/csslayoutsync.tmp - printf "// NOTE: this file is auto-copied from https://github.com/facebook/css-layout\n" >> /tmp/csslayoutsync.tmp + printf "/**\n" > /tmp/yogasync.tmp + printf " * Copyright (c) 2014-present, Facebook, Inc.\n" >> /tmp/yogasync.tmp + printf " * All rights reserved.\n" >> /tmp/yogasync.tmp + printf " * This source code is licensed under the BSD-style license found in the\n" >> /tmp/yogasync.tmp + printf " * LICENSE file in the root directory of this source tree. An additional grant\n" >> /tmp/yogasync.tmp + printf " * of patent rights can be found in the PATENTS file in the same directory.\n" >> /tmp/yogasync.tmp + printf " */\n\n" >> /tmp/yogasync.tmp + printf "// NOTE: this file is auto-copied from https://github.com/facebook/css-layout\n" >> /tmp/yogasync.tmp # The following is split over four lines so Phabricator doesn't think this file is generated - printf "// @g" >> /tmp/csslayoutsync.tmp - printf "enerated <> /tmp/csslayoutsync.tmp - printf "ignedSource::*O*zOeWoEQle#+L" >> /tmp/csslayoutsync.tmp - printf "!plEphiEmie@IsG>>\n\n" >> /tmp/csslayoutsync.tmp - tail -n +9 $1 >> /tmp/csslayoutsync.tmp - mv /tmp/csslayoutsync.tmp $1 + printf "// @g" >> /tmp/yogasync.tmp + printf "enerated <> /tmp/yogasync.tmp + printf "ignedSource::*O*zOeWoEQle#+L" >> /tmp/yogasync.tmp + printf "!plEphiEmie@IsG>>\n\n" >> /tmp/yogasync.tmp + tail -n +9 $1 >> /tmp/yogasync.tmp + mv /tmp/yogasync.tmp $1 $ROOT/fbandroid/scripts/signedsource.py sign $1 } @@ -45,10 +45,10 @@ COMMIT_ID=$(git rev-parse HEAD) popd C_SRC=$GITHUB/src/ -JAVA_SRC=$GITHUB/src/java/src/com/facebook/csslayout -TESTS=$GITHUB/src/java/tests/com/facebook/csslayout -FBA_SRC=$ROOT/fbandroid/java/com/facebook/catalyst/js/react-native-github/ReactAndroid/src/main/java/com/facebook/csslayout/ -FBA_TESTS=$ROOT/fbandroid/javatests/com/facebook/csslayout/ +JAVA_SRC=$GITHUB/src/java/src/com/facebook/yoga +TESTS=$GITHUB/src/java/tests/com/facebook/yoga +FBA_SRC=$ROOT/fbandroid/java/com/facebook/catalyst/js/react-native-github/ReactAndroid/src/main/java/com/facebook/yoga/ +FBA_TESTS=$ROOT/fbandroid/javatests/com/facebook/yoga/ FBO_SRC=$ROOT/fbobjc/Libraries/FBReactKit/js/react-native-github/React/Layout/ echo "Copying fbandroid src files over..." @@ -78,14 +78,14 @@ HEAD at the time this code was synced: https://github.com/facebook/css-layout/co There is generated code in: - README (this file) - - fbandroid/java/com/facebook/csslayout - - fbandroid/javatests/com/facebook/csslayout + - fbandroid/java/com/facebook/yoga + - fbandroid/javatests/com/facebook/yoga - fbobjc/Libraries/FBReactKit/js/react-native-github/React/Layout The code was generated by running 'make' in the css-layout folder and running: scripts/sync-css-layout.sh -" > /tmp/csslayoutsync.tmp +" > /tmp/yogasync.tmp -cp /tmp/csslayoutsync.tmp "$FBA_SRC/README" -cp /tmp/csslayoutsync.tmp "$FBO_SRC/README" +cp /tmp/yogasync.tmp "$FBA_SRC/README" +cp /tmp/yogasync.tmp "$FBO_SRC/README"