Skip to content

Commit

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

Differential Revision: D4284681

Summary: Rename csslayout directories to yoga

fbshipit-source-id: f0c6855c2c6e4389b7867f48f72cbb697830fc5a
  • Loading branch information
Emil Sjolander authored and Facebook Github Bot committed Dec 7, 2016
1 parent 40371cb commit b111554
Show file tree
Hide file tree
Showing 89 changed files with 82 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ before_install:
- export PATH=$JAVA_HOME/bin:$PATH

script:
- buck test //:CSSLayout
- buck test //:yoga
- buck test //java:java
- buck test //YogaKit:YogaKit --config cxx.default_platform=iphonesimulator-x86_64 --config cxx.cflags=-DTRAVIS_CI
- sh csharp/tests/Facebook.Yoga/test_macos.sh
Expand Down
10 changes: 5 additions & 5 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ COMPILER_FLAGS = BASE_COMPILER_FLAGS + ['-std=c11', '-fPIC']
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + ['-std=c++11']

cxx_library(
name = 'CSSLayout',
srcs = glob(['CSSLayout/*.c']),
name = 'yoga',
srcs = glob(['yoga/*.c']),
tests=[':tests'],
exported_headers = subdir_glob([('', 'CSSLayout/*.h')]),
exported_headers = subdir_glob([('', 'yoga/*.h')]),
header_namespace = '',
compiler_flags = COMPILER_FLAGS,
deps = [] if THIS_IS_FBOBJC else [
csslayout_dep('lib/fb:ndklog'),
yoga_dep('lib/fb:ndklog'),
],
visibility = ['PUBLIC'],
)
Expand All @@ -42,7 +42,7 @@ cxx_test(
srcs = glob(['tests/*.cpp']),
compiler_flags = TEST_COMPILER_FLAGS,
deps = [
':CSSLayout',
':yoga',
GTEST_TARGET,
],
visibility = ['PUBLIC'],
Expand Down
6 changes: 3 additions & 3 deletions YOGA_DEFS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

CSSLAYOUT_ROOT = '//...'
YOGA_ROOT = '//...'
INFER_ANNOTATIONS_TARGET = '//lib/infer-annotations:infer-annotations'
JSR_305_TARGET = '//lib/jsr-305:jsr-305'
JUNIT_TARGET = '//lib/junit:junit'
Expand All @@ -12,12 +12,12 @@ FBJNI_TARGET = '//lib/fb:fbjni'
THIS_IS_FBOBJC = False

CXX_LIBRARY_WHITELIST = [
'//:CSSLayout',
'//:yoga',
'//lib/fb:fbjni',
'//java:jni',
]

def csslayout_dep(dep):
def yoga_dep(dep):
return '//' + dep

class allow_unsafe_import:
Expand Down
8 changes: 4 additions & 4 deletions YogaKit/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

include_defs('//YOGA_DEFS')

UIKIT_CSSLAYOUT_COMPILER_FLAGS = [
COMPILER_FLAGS = [
'-fobjc-arc',
'-Wconditional-uninitialized',
'-Wdangling-else',
Expand All @@ -29,7 +29,7 @@ UIKIT_CSSLAYOUT_COMPILER_FLAGS = [

apple_library(
name = 'YogaKit',
compiler_flags = UIKIT_CSSLAYOUT_COMPILER_FLAGS,
compiler_flags = COMPILER_FLAGS,
tests = [':YogaKitTests'],
srcs = glob(['*.m']),
exported_headers = glob(['*.h']),
Expand All @@ -38,14 +38,14 @@ apple_library(
'$SDKROOT/System/Library/Frameworks/UIKit.framework',
],
deps = [
csslayout_dep(':CSSLayout'),
yoga_dep(':yoga'),
],
visibility = ['PUBLIC'],
)

apple_test(
name = 'YogaKitTests',
compiler_flags = UIKIT_CSSLAYOUT_COMPILER_FLAGS,
compiler_flags = COMPILER_FLAGS,
info_plist = 'Tests/Info.plist',
srcs = glob(['Tests/**/*.m']),
frameworks = [
Expand Down
2 changes: 1 addition & 1 deletion YogaKit/UIView+Yoga.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

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

@interface UIView (Yoga)

Expand Down
2 changes: 1 addition & 1 deletion benchmark/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cxx_binary(
'-std=c11',
],
deps = [
csslayout_dep(':CSSLayout'),
yoga_dep(':yoga'),
],
visibility = ['PUBLIC'],
)
2 changes: 1 addition & 1 deletion benchmark/YGBenchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "YGBenchmark.h"

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

static YGSize _measure(YGNodeRef node,
float width,
Expand Down
4 changes: 2 additions & 2 deletions csharp/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
# of patent rights can be found in the PATENTS file in the same directory.

csharp_library(
name = 'csslibnet46',
name = 'yogalibnet46',
dll_name = 'Facebook.Yoga.dll',
framework_ver = 'net46',
srcs = glob(['**/*.cs']),
)

csharp_library(
name = 'csslibnet45',
name = 'yogalibnet45',
dll_name = 'Facebook.Yoga.dll',
framework_ver = 'net45',
srcs = glob(['**/*.cs']),
Expand Down
6 changes: 3 additions & 3 deletions csharp/Facebook.Yoga/Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public static extern void YGInteropSetLogger(
public static extern IntPtr YGNodeNew();

[DllImport(DllName)]
public static extern void YGNodeInit(IntPtr cssNode);
public static extern void YGNodeInit(IntPtr node);

[DllImport(DllName)]
public static extern void YGNodeFree(IntPtr cssNode);
public static extern void YGNodeFree(IntPtr node);

[DllImport(DllName)]
public static extern void YGNodeReset(IntPtr cssNode);
public static extern void YGNodeReset(IntPtr node);

[DllImport(DllName)]
public static extern int YGNodeGetInstanceCount();
Expand Down
2 changes: 1 addition & 1 deletion csharp/Yoga/YGInterop.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#pragma once

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

YG_EXTERN_C_BEGIN

Expand Down
10 changes: 5 additions & 5 deletions csharp/Yoga/Yoga.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,16 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\CSSLayout\Yoga.h" />
<ClInclude Include="..\..\CSSLayout\YGMacros.h" />
<ClInclude Include="..\..\CSSLayout\YGNodeList.h" />
<ClInclude Include="..\..\yoga\Yoga.h" />
<ClInclude Include="..\..\yoga\YGMacros.h" />
<ClInclude Include="..\..\yoga\YGNodeList.h" />
<ClInclude Include="YGInterop.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\CSSLayout\Yoga.c" />
<ClCompile Include="..\..\CSSLayout\YGNodeList.c" />
<ClCompile Include="..\..\yoga\Yoga.c" />
<ClCompile Include="..\..\yoga\YGNodeList.c" />
<ClCompile Include="YGInterop.cpp" />
<ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
Expand Down
10 changes: 5 additions & 5 deletions csharp/Yoga/Yoga.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\CSSLayout\Yoga.h">
<ClInclude Include="..\..\yoga\Yoga.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\CSSLayout\YGMacros.h">
<ClInclude Include="..\..\yoga\YGMacros.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\CSSLayout\YGNodeList.h">
<ClInclude Include="..\..\yoga\YGNodeList.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="YGInterop.h">
Expand All @@ -41,10 +41,10 @@
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\CSSLayout\Yoga.c">
<ClCompile Include="..\..\yoga\Yoga.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\CSSLayout\YGNodeList.c">
<ClCompile Include="..\..\yoga\YGNodeList.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="YGInterop.cpp">
Expand Down
2 changes: 1 addition & 1 deletion csharp/tests/Facebook.Yoga/test_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ if [ -d $NUNIT \
rm NUnit-2.6.4.zip
fi

clang -g -Wall -Wextra -dynamiclib -o libyoga.dylib -I../../.. ../../../CSSLayout/*.c ../../Yoga/YGInterop.cpp
clang -g -Wall -Wextra -dynamiclib -o libyoga.dylib -I../../.. ../../../yoga/*.c ../../Yoga/YGInterop.cpp
mcs -debug -t:library -r:$NUNIT/nunit.framework.dll -out:YogaTest.dll *.cs ../../../csharp/Facebook.Yoga/*cs
MONO_PATH=$NUNIT mono --arch=64 --debug $NUNIT/nunit-console.exe YogaTest.dll
4 changes: 2 additions & 2 deletions enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def to_java_upper(symbol):
root = os.path.dirname(__file__)

# write out C header
with open(root + '/CSSLayout/YGEnums.h', 'w') as f:
with open(root + '/yoga/YGEnums.h', 'w') as f:
f.write(LICENSE)
f.write('#pragma once\n\n')
f.write('#include "YGMacros.h"\n\n')
Expand All @@ -133,7 +133,7 @@ def to_java_upper(symbol):

# write out java files
for name, values in ENUMS.items():
with open(root + '/java/com/facebook/csslayout/Yoga%s.java' % name, 'w') as f:
with open(root + '/java/com/facebook/yoga/Yoga%s.java' % name, 'w') as f:
f.write(LICENSE)
f.write('package com.facebook.yoga;\n\n')
f.write('import com.facebook.proguard.annotations.DoNotStrip;\n\n')
Expand Down
3 changes: 1 addition & 2 deletions format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ clang-format \
SpaceAfterCStyleCast: true, \
UseTab: Never, \
}" "$@" \
-i $(dirname $0)/CSSLayout/*.{h,c,cpp} \
$(dirname $0)/tests/CSSLayoutTestUtils/*.{h,c,cpp} \
-i $(dirname $0)/yoga/*.{h,c,cpp} \
$(dirname $0)/benchmarks/*.{h,c,cpp} \
$(dirname $0)/java/jni/*.{h,c,cpp}
2 changes: 1 addition & 1 deletion gentest/gentest-cpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CPPEmitter.prototype = Object.create(Emitter.prototype, {

emitPrologue:{value:function() {
this.push([
'#include <CSSLayout/Yoga.h>',
'#include <yoga/Yoga.h>',
'#include <gtest/gtest.h>',
'',
]);
Expand Down
2 changes: 1 addition & 1 deletion gentest/gentest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
f.write eval(logs[0].message.sub(/^[^"]*/, ''))
f.close

f = File.open("../java/tests/com/facebook/csslayout/#{name}.java", 'w')
f = File.open("../java/tests/com/facebook/yoga/#{name}.java", 'w')
f.write eval(logs[1].message.sub(/^[^"]*/, '')).sub('YogaTest', name)
f.close

Expand Down
6 changes: 3 additions & 3 deletions java/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ cxx_library(
deps = [
FBJNI_TARGET,
JNI_TARGET,
csslayout_dep(':CSSLayout'),
yoga_dep(':yoga'),
],
visibility = ['PUBLIC'],
)

java_library(
name = 'java',
srcs = glob(['com/facebook/csslayout/*.java']),
srcs = glob(['com/facebook/yoga/*.java']),
tests=[
csslayout_dep('java:tests'),
yoga_dep('java:tests'),
],
source = '1.7',
target = '1.7',
Expand Down
2 changes: 1 addition & 1 deletion java/com/facebook/proguard/annotations/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ java_library(
source = '1.7',
target = '1.7',
deps = [],
visibility = [CSSLAYOUT_ROOT],
visibility = [YOGA_ROOT],
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion java/jni/YGJNI.cpp
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 lib/fb/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ prebuilt_cxx_library(
exported_platform_linker_flags = [
('android.*', ['-llog']),
],
visibility = [CSSLAYOUT_ROOT],
visibility = [YOGA_ROOT],
)

cxx_library(
Expand Down
2 changes: 1 addition & 1 deletion lib/gtest/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ cxx_library(
header_namespace = '',
compiler_flags = COMPILER_FLAGS,
deps = [],
visibility = [CSSLAYOUT_ROOT],
visibility = [YOGA_ROOT],
)
2 changes: 1 addition & 1 deletion lib/infer-annotations/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ java_library(
exported_deps = [
':infer-annotations-jar',
],
visibility = [CSSLAYOUT_ROOT],
visibility = [YOGA_ROOT],
)
2 changes: 1 addition & 1 deletion lib/jsr-305/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ java_library(
exported_deps = [
':jsr305-jar',
],
visibility = [CSSLAYOUT_ROOT],
visibility = [YOGA_ROOT],
)
2 changes: 1 addition & 1 deletion lib/junit/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ java_library(
exported_deps = [
':junit-jar',
],
visibility = [CSSLAYOUT_ROOT],
visibility = [YOGA_ROOT],
)
2 changes: 1 addition & 1 deletion lib/soloader/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ include_defs('//YOGA_DEFS')
android_prebuilt_aar(
name = 'soloader',
aar = 'soloader-0.1.0.aar',
visibility = [CSSLAYOUT_ROOT],
visibility = [YOGA_ROOT],
)
2 changes: 1 addition & 1 deletion tests/YGAbsolutePositionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// @Generated by gentest/gentest.rb from gentest/fixtures/YGAbsolutePositionTest.html

#include <CSSLayout/Yoga.h>
#include <yoga/Yoga.h>
#include <gtest/gtest.h>

TEST(YogaTest, absolute_layout_width_height_start_top) {
Expand Down
2 changes: 1 addition & 1 deletion tests/YGAlignContentTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html

#include <CSSLayout/Yoga.h>
#include <yoga/Yoga.h>
#include <gtest/gtest.h>

TEST(YogaTest, align_content_flex_start) {
Expand Down
2 changes: 1 addition & 1 deletion tests/YGAlignItemsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html

#include <CSSLayout/Yoga.h>
#include <yoga/Yoga.h>
#include <gtest/gtest.h>

TEST(YogaTest, align_items_stretch) {
Expand Down
2 changes: 1 addition & 1 deletion tests/YGAlignSelfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignSelfTest.html

#include <CSSLayout/Yoga.h>
#include <yoga/Yoga.h>
#include <gtest/gtest.h>

TEST(YogaTest, align_self_center) {
Expand Down
2 changes: 1 addition & 1 deletion tests/YGBorderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// @Generated by gentest/gentest.rb from gentest/fixtures/YGBorderTest.html

#include <CSSLayout/Yoga.h>
#include <yoga/Yoga.h>
#include <gtest/gtest.h>

TEST(YogaTest, border_no_size) {
Expand Down
Loading

0 comments on commit b111554

Please sign in to comment.