Skip to content

Commit

Permalink
Rename directories
Browse files Browse the repository at this point in the history
Reviewed By: gkassabli

Differential Revision: D4284681

fbshipit-source-id: f0c6855c2c6e4389b7867f48f72cbb697830fc5a
  • Loading branch information
Emil Sjolander authored and Facebook Github Bot committed Dec 7, 2016
1 parent cf3ae6c commit 7f8c298
Show file tree
Hide file tree
Showing 61 changed files with 149 additions and 168 deletions.
16 changes: 8 additions & 8 deletions Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Text/RCTTextManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import "RCTTextManager.h"

#import <CSSLayout/Yoga.h>
#import <yoga/Yoga.h>
#import <React/RCTAccessibilityManager.h>
#import <React/RCTAssert.h>
#import <React/RCTConvert.h>
Expand Down
10 changes: 5 additions & 5 deletions React.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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|
Expand Down
2 changes: 1 addition & 1 deletion React/Base/RCTConvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIKit.h>

#import <CSSLayout/Yoga.h>
#import <yoga/Yoga.h>
#import <React/RCTAnimationType.h>
#import <React/RCTBorderStyle.h>
#import <React/RCTDefines.h>
Expand Down
2 changes: 1 addition & 1 deletion React/Modules/RCTUIManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#import <AVFoundation/AVFoundation.h>

#import <CSSLayout/Yoga.h>
#import <yoga/Yoga.h>

#import "RCTAccessibilityManager.h"
#import "RCTAnimationType.h"
Expand Down
134 changes: 65 additions & 69 deletions React/React.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion React/Views/RCTShadowView.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <UIKit/UIKit.h>

#import <CSSLayout/Yoga.h>
#import <yoga/Yoga.h>
#import <React/RCTComponent.h>
#import <React/RCTRootView.h>

Expand Down
8 changes: 4 additions & 4 deletions ReactAndroid/DEFS
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions ReactAndroid/src/main/java/com/facebook/BUCK
Original file line number Diff line number Diff line change
@@ -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'),
Expand All @@ -13,5 +13,5 @@ android_library(
)

project_config(
src_target = ':csslayout',
src_target = ':yoga',
)
15 changes: 0 additions & 15 deletions ReactAndroid/src/main/java/com/facebook/csslayout/README

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ public void setMeasureFunction(YogaMeasureFunction measureFunction) {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void addView(View child, int index) {
// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ LOCAL_SHARED_LIBRARIES := libfb

include $(BUILD_SHARED_LIBRARY)

$(call import-module,CSSLayout)
$(call import-module,yoga)
$(call import-module,fb)
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if IS_OSS_BUILD:
'-std=c++11',
],
deps = [
'//ReactCommon/CSSLayout:CSSLayout',
'//ReactCommon/yoga:yoga',
FBJNI_TARGET,
],
visibility = ['PUBLIC'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/

#include <CSSLayout/Yoga.h>
#include <yoga/Yoga.h>
#include <fb/fbjni.h>
#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/xreact/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion ReactAndroid/src/test/java/com/facebook/react/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/test/java/com/facebook/react/modules/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/test/java/com/facebook/react/views/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

1 comment on commit 7f8c298

@arthurnn
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why, but after upgrading a react-native app to latest, I am getting a 'yoga/Yoga.h file not found' error. Might be related that the app is using cocoapods. Not sure what it is yet tho.

Please sign in to comment.