diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..52a48cf2
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,56 @@
+Language: Cpp
+AccessModifierOffset: -2
+AlignAfterOpenBracket: AlwaysBreak
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlines: Left
+AlignOperands: false
+AlignTrailingComments: false
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: Empty
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: true
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: true
+AlwaysBreakTemplateDeclarations: Yes
+BinPackArguments: false
+BinPackParameters: false
+BreakBeforeBinaryOperators: false
+BreakBeforeBraces: Attach
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializers: BeforeColon
+BreakInheritanceList: BeforeColon
+BreakStringLiterals: true
+ColumnLimit: 80
+CompactNamespaces: false
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: false
+FixNamespaceComments: true
+IndentCaseLabels: true
+IndentPPDirectives: None
+IndentWidth: 2
+IndentWrappedFunctionNames: false
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
+PenaltyReturnTypeOnItsOwnLine: 2000
+PointerAlignment: Left
+ReflowComments: true
+SortIncludes: false
+SortUsingDeclarations: true
+SpaceAfterCStyleCast: true
+SpaceAfterTemplateKeyword: true
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeCpp11BracedList: false
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
+SpaceBeforeParens: ControlStatements
+SpaceBeforeRangeBasedForLoopColon: true
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+Standard: Cpp11
+UseTab: Never
diff --git a/.clang-format-ignore b/.clang-format-ignore
new file mode 100644
index 00000000..51430a06
--- /dev/null
+++ b/.clang-format-ignore
@@ -0,0 +1 @@
+^lib/.*
diff --git a/.travis.yml b/.travis.yml
index 9f7c4a14..0c42284f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,12 @@
language: java
+os: linux
+addons:
+ apt:
+ sources:
+ - llvm-toolchain-trusty-6.0
+ - ubuntu-toolchain-r-test
+ packages:
+ - clang-6.0
env:
- TARGET: website
diff --git a/BUCK b/BUCK
index fd87a83b..4087a183 100644
--- a/BUCK
+++ b/BUCK
@@ -1,9 +1,8 @@
-# Copyright (c) 2014-present, Facebook, Inc.
+# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
-
-load("//:yoga_defs.bzl", "BASE_COMPILER_FLAGS", "GTEST_TARGET", "LIBRARY_COMPILER_FLAGS", "yoga_cxx_library", "yoga_cxx_test", "yoga_dep")
+load("//tools/build_defs/oss:yoga_defs.bzl", "BASE_COMPILER_FLAGS", "GTEST_TARGET", "LIBRARY_COMPILER_FLAGS", "subdir_glob", "yoga_cxx_library", "yoga_cxx_test", "yoga_dep")
GMOCK_OVERRIDE_FLAGS = [
# gmock does not mark mocked methods as override, ignore the warnings in tests
@@ -21,6 +20,7 @@ TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + [
yoga_cxx_library(
name = "yoga",
srcs = glob(["yoga/*.cpp"]),
+ headers = subdir_glob([("", "yoga/**/*.h")]),
header_namespace = "",
exported_headers = subdir_glob([("", "yoga/*.h")]),
compiler_flags = COMPILER_FLAGS,
@@ -35,6 +35,7 @@ yoga_cxx_library(
yoga_cxx_test(
name = "YogaTests",
srcs = glob(["tests/*.cpp"]),
+ headers = subdir_glob([("", "yoga/**/*.h")]),
compiler_flags = TEST_COMPILER_FLAGS,
contacts = ["emilsj@fb.com"],
visibility = ["PUBLIC"],
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 64bd1606..5a89aced 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014-present, Facebook, Inc.
+# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 55203be7..0fb24580 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,3 +1,3 @@
# Code of Conduct
-Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.
+Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.fb.com/codeofconduct/) so that you can understand what actions will and will not be tolerated.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 679644f2..fa519766 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,7 +4,7 @@ possible.
## Code of Conduct
-Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.
+Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.fb.com/codeofconduct/) so that you can understand what actions will and will not be tolerated.
## Pull Requests
We actively welcome your pull requests.
diff --git a/LICENSE b/LICENSE
index cde61b6c..b96dcb04 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2014-present, Facebook, Inc.
+Copyright (c) Facebook, Inc. and its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 703aa160..74c9d245 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ For testing we rely on [gtest](https://github.com/google/googletest) as a submod
For any changes you make you should ensure that all the tests are passing. In case you make any fixes or additions to the library please also add tests for that change to ensure we don't break anything in the future. Tests are located in the `tests` directory. Run the tests by executing `buck test //:yoga`.
-Instead of manually writing a test which ensures parity with web implementations of Flexbox you can run `gentest/gentest.rb` to generated a test for you. You can write html which you want to verify in Yoga, in `gentest/fixtures` folder, such as the following.
+Instead of manually writing a test which ensures parity with web implementations of Flexbox you can run `gentest/gentest.rb` to generate a test for you. You can write html which you want to verify in Yoga, in `gentest/fixtures` folder, such as the following.
```html
diff --git a/Yoga.podspec b/Yoga.podspec
index 7d4553e8..81cd79d3 100644
--- a/Yoga.podspec
+++ b/Yoga.podspec
@@ -1,6 +1,12 @@
+#
+# Copyright (c) Facebook, Inc. and its affiliates.
+#
+# This source code is licensed under the MIT license found in the LICENSE
+# file in the root directory of this source tree.
+#
Pod::Spec.new do |spec|
spec.name = 'Yoga'
- spec.version = '1.8.1'
+ spec.version = '1.9.0'
spec.license = { :type => 'MIT', :file => "LICENSE" }
spec.homepage = 'https://yogalayout.com/'
spec.documentation_url = 'https://yogalayout.com/docs'
@@ -11,11 +17,14 @@ Pod::Spec.new do |spec|
spec.authors = 'Facebook'
spec.source = {
:git => 'https://github.com/facebook/yoga.git',
- :tag => '1.8.0',
+ :tag => spec.version.to_s,
}
- spec.platforms = { :ios => "8.0", :tvos => "10.0" }
+ spec.platforms = { :ios => "4.3", :osx => "10.7", :tvos => "10.0", :watchos => "2.0" }
spec.module_name = 'yoga'
spec.requires_arc = false
+ spec.pod_target_xcconfig = {
+ 'DEFINES_MODULE' => 'YES'
+ }
spec.compiler_flags = [
'-fno-omit-frame-pointer',
'-fexceptions',
@@ -25,6 +34,6 @@ Pod::Spec.new do |spec|
'-fPIC'
]
spec.source_files = 'yoga/**/*.{c,h,cpp}'
- spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros}.h'
+ spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGValue}.h'
end
diff --git a/YogaKit.podspec b/YogaKit.podspec
index e21f6808..cedbe73e 100644
--- a/YogaKit.podspec
+++ b/YogaKit.podspec
@@ -1,6 +1,12 @@
+#
+# Copyright (c) Facebook, Inc. and its affiliates.
+#
+# This source code is licensed under the MIT license found in the LICENSE
+# file in the root directory of this source tree.
+#
podspec = Pod::Spec.new do |spec|
spec.name = 'YogaKit'
- spec.version = '1.8.1'
+ spec.version = '1.9.0'
spec.license = { :type => 'MIT', :file => "LICENSE" }
spec.homepage = 'https://facebook.github.io/yoga/'
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/yogakit/'
@@ -11,14 +17,14 @@ podspec = Pod::Spec.new do |spec|
spec.authors = 'Facebook'
spec.source = {
:git => 'https://github.com/facebook/yoga.git',
- :tag => '1.7.0',
+ :tag => spec.version.to_s,
}
spec.platform = :ios
spec.ios.deployment_target = '8.0'
spec.ios.frameworks = 'UIKit'
- spec.dependency 'Yoga', '~> 1.8.1'
+ spec.dependency 'Yoga', '~> 1.9'
spec.source_files = 'YogaKit/Source/*.{h,m,swift}'
spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h'
spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h'
diff --git a/YogaKit/BUCK b/YogaKit/BUCK
index 14198edb..c3d534e8 100644
--- a/YogaKit/BUCK
+++ b/YogaKit/BUCK
@@ -1,9 +1,8 @@
-# Copyright (c) 2014-present, Facebook, Inc.
+# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
-
-load("//:yoga_defs.bzl", "yoga_apple_library", "yoga_apple_test", "yoga_dep")
+load("//tools/build_defs/oss:yoga_defs.bzl", "subdir_glob", "yoga_apple_library", "yoga_apple_test", "yoga_dep")
COMPILER_FLAGS = [
"-fobjc-arc",
diff --git a/YogaKit/Source/UIView+Yoga.h b/YogaKit/Source/UIView+Yoga.h
index 5a5ae00a..6b012bb6 100644
--- a/YogaKit/Source/UIView+Yoga.h
+++ b/YogaKit/Source/UIView+Yoga.h
@@ -1,10 +1,9 @@
/**
- * Copyright (c) 2014-present, Facebook, Inc.
+ * Copyright (c) Facebook, Inc. and its affiliates.
*
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
+ * This source code is licensed under the MIT license found in the LICENSE
+ * file in the root directory of this source tree.
*/
-
#import "YGLayout.h"
#import
diff --git a/YogaKit/Source/UIView+Yoga.m b/YogaKit/Source/UIView+Yoga.m
index eb360a8c..963362d5 100644
--- a/YogaKit/Source/UIView+Yoga.m
+++ b/YogaKit/Source/UIView+Yoga.m
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014-present, Facebook, Inc.
+ * Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
diff --git a/YogaKit/Source/YGLayout+Private.h b/YogaKit/Source/YGLayout+Private.h
index d810fa87..601eda18 100644
--- a/YogaKit/Source/YGLayout+Private.h
+++ b/YogaKit/Source/YGLayout+Private.h
@@ -1,10 +1,9 @@
/**
- * Copyright (c) 2014-present, Facebook, Inc.
+ * Copyright (c) Facebook, Inc. and its affiliates.
*
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
+ * This source code is licensed under the MIT license found in the LICENSE
+ * file in the root directory of this source tree.
*/
-
#import "YGLayout.h"
#import
diff --git a/YogaKit/Source/YGLayout.h b/YogaKit/Source/YGLayout.h
index 7b9d583a..c8ee2e84 100644
--- a/YogaKit/Source/YGLayout.h
+++ b/YogaKit/Source/YGLayout.h
@@ -1,10 +1,9 @@
/**
- * Copyright (c) 2014-present, Facebook, Inc.
+ * Copyright (c) Facebook, Inc. and its affiliates.
*
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
+ * This source code is licensed under the MIT license found in the LICENSE
+ * file in the root directory of this source tree.
*/
-
#import
#import
#import
@@ -33,6 +32,13 @@ typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) {
- (instancetype)init
__attribute__((unavailable("you are not meant to initialise YGLayout")));
+/**
+ Make default init unavailable, as it will not initialise YGNode which is
+ required for the setters and getters of YGLayout's properties to work properly.
+ */
++ (instancetype)new
+ __attribute__((unavailable("you are not meant to initialise YGLayout")));
+
/**
The property that decides if we should include this view when calculating
layout. Defaults to YES.
@@ -56,6 +62,7 @@ typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) {
@property (nonatomic, readwrite, assign) YGOverflow overflow;
@property (nonatomic, readwrite, assign) YGDisplay display;
+@property (nonatomic, readwrite, assign) CGFloat flex;
@property (nonatomic, readwrite, assign) CGFloat flexGrow;
@property (nonatomic, readwrite, assign) CGFloat flexShrink;
@property (nonatomic, readwrite, assign) YGValue flexBasis;
diff --git a/YogaKit/Source/YGLayout.m b/YogaKit/Source/YGLayout.m
index ad0ef7f2..e333765f 100644
--- a/YogaKit/Source/YGLayout.m
+++ b/YogaKit/Source/YGLayout.m
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014-present, Facebook, Inc.
+ * Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
@@ -129,6 +129,7 @@ static YGConfigRef globalConfig;
@interface YGLayout ()
@property (nonatomic, weak, readonly) UIView *view;
+@property(nonatomic, assign, readonly) BOOL isUIView;
@end
@@ -153,6 +154,7 @@ static YGConfigRef globalConfig;
YGNodeSetContext(_node, (__bridge void *) view);
_isEnabled = NO;
_isIncludedInLayout = YES;
+ _isUIView = [view isMemberOfClass:[UIView class]];
}
return self;
@@ -227,6 +229,7 @@ YG_PROPERTY(YGWrap, flexWrap, FlexWrap)
YG_PROPERTY(YGOverflow, overflow, Overflow)
YG_PROPERTY(YGDisplay, display, Display)
+YG_PROPERTY(CGFloat, flex, Flex)
YG_PROPERTY(CGFloat, flexGrow, FlexGrow)
YG_PROPERTY(CGFloat, flexShrink, FlexShrink)
YG_AUTO_VALUE_PROPERTY(flexBasis, FlexBasis)
@@ -331,10 +334,20 @@ static YGSize YGMeasureView(
const CGFloat constrainedHeight = (heightMode == YGMeasureModeUndefined) ? CGFLOAT_MAX: height;
UIView *view = (__bridge UIView*) YGNodeGetContext(node);
- const CGSize sizeThatFits = [view sizeThatFits:(CGSize) {
- .width = constrainedWidth,
- .height = constrainedHeight,
- }];
+ CGSize sizeThatFits = CGSizeZero;
+
+ // The default implementation of sizeThatFits: returns the existing size of
+ // the view. That means that if we want to layout an empty UIView, which
+ // already has got a frame set, its measured size should be CGSizeZero, but
+ // UIKit returns the existing size.
+ //
+ // See https://github.com/facebook/yoga/issues/606 for more information.
+ if (!view.yoga.isUIView || [view.subviews count] > 0) {
+ sizeThatFits = [view sizeThatFits:(CGSize){
+ .width = constrainedWidth,
+ .height = constrainedHeight,
+ }];
+ }
return (YGSize) {
.width = YGSanitizeMeasurement(constrainedWidth, sizeThatFits.width, widthMode),
diff --git a/YogaKit/Source/YGLayoutExtensions.swift b/YogaKit/Source/YGLayoutExtensions.swift
index dc91c1d2..fa414449 100644
--- a/YogaKit/Source/YGLayoutExtensions.swift
+++ b/YogaKit/Source/YGLayoutExtensions.swift
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014-present, Facebook, Inc.
+ * Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
diff --git a/YogaKit/Tests/YogaKitTests.m b/YogaKit/Tests/YogaKitTests.m
index 8e07462a..b9d3a6ed 100644
--- a/YogaKit/Tests/YogaKitTests.m
+++ b/YogaKit/Tests/YogaKitTests.m
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014-present, Facebook, Inc.
+ * Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
@@ -127,6 +127,15 @@
XCTAssertEqual(longTextLabelSize.width + textBadgeView.yoga.intrinsicSize.width, containerSize.width);
}
+- (void)testSizeThatFitsEmptyView {
+ UIView* view = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 200, 200)];
+ view.yoga.isEnabled = YES;
+
+ const CGSize viewSize = view.yoga.intrinsicSize;
+ XCTAssertEqual(viewSize.height, 0);
+ XCTAssertEqual(viewSize.width, 0);
+}
+
- (void)testPreservingOrigin
{
UIView *container = [[UIView alloc] initWithFrame:CGRectMake(0,0,50,75)];
diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj
index 654f9ebb..01b15da3 100644
--- a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj
+++ b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
// !$*UTF8*$!
{
archiveVersion = 1;
diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
index b8f12e0b..cee8ad8b 100644
--- a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -1,3 +1,10 @@
+
+
diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcworkspace/contents.xcworkspacedata b/YogaKit/YogaKitSample/YogaKitSample.xcworkspace/contents.xcworkspacedata
index c64c0fa8..ad8697b8 100644
--- a/YogaKit/YogaKitSample/YogaKitSample.xcworkspace/contents.xcworkspacedata
+++ b/YogaKit/YogaKitSample/YogaKitSample.xcworkspace/contents.xcworkspacedata
@@ -1,3 +1,10 @@
+
+
diff --git a/android/BUCK b/android/BUCK
index af64135f..f72dde8b 100644
--- a/android/BUCK
+++ b/android/BUCK
@@ -1,9 +1,9 @@
-# Copyright (c) 2014-present, Facebook, Inc.
+# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
-load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "yoga_android_aar", "yoga_android_resource")
+load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "yoga_android_aar", "yoga_android_resource")
yoga_android_aar(
name = "android",
diff --git a/android/build.gradle b/android/build.gradle
index 042459a2..7dc4904b 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
diff --git a/android/gradle.properties b/android/gradle.properties
index e03c3c0c..76b74e27 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,3 +1,10 @@
+#
+# Copyright (c) Facebook, Inc. and its affiliates.
+#
+# This source code is licensed under the MIT license found in the LICENSE
+# file in the root directory of this source tree.
+#
+
GROUP=com.facebook.yoga.android
POM_NAME=YogaLayout
POM_DESCRIPTION=YogaLayout
diff --git a/android/sample/BUCK b/android/sample/BUCK
index 966c700d..0989fcd6 100644
--- a/android/sample/BUCK
+++ b/android/sample/BUCK
@@ -4,7 +4,8 @@
# This source code is licensed under the license found in the
# LICENSE-examples file in the root directory of this source tree.
-load("//:yoga_defs.bzl", "ANDROID_RES_TARGET", "ANDROID_SAMPLE_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "yoga_android_binary", "yoga_android_resource")
+load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
+load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID_RES_TARGET", "ANDROID_SAMPLE_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "yoga_android_binary", "yoga_android_resource")
yoga_android_binary(
name = "sample",
@@ -28,7 +29,7 @@ yoga_android_resource(
],
)
-keystore(
+fb_native.keystore(
name = "debug_keystore",
properties = "debug.keystore.properties",
store = "debug.keystore",
diff --git a/android/sample/java/com/facebook/samples/yoga/BUCK b/android/sample/java/com/facebook/samples/yoga/BUCK
index 4c216b1e..31609016 100644
--- a/android/sample/java/com/facebook/samples/yoga/BUCK
+++ b/android/sample/java/com/facebook/samples/yoga/BUCK
@@ -1,9 +1,9 @@
-# Copyright (c) 2014-present, Facebook, Inc.
+# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the license found in the
# LICENSE-examples file in the root directory of this source tree.
-load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_SUPPORT_TARGET", "APPCOMPAT_TARGET", "SOLOADER_TARGET", "yoga_android_library")
+load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_SUPPORT_TARGET", "APPCOMPAT_TARGET", "SOLOADER_TARGET", "yoga_android_library")
yoga_android_library(
name = "yoga",
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index b5ae6f2f..dd2d58c6 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -1,7 +1,7 @@