Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a BUCK file for ComponentKit #744

Open
kostiadombrovsky opened this issue Feb 9, 2017 · 5 comments
Open

Add a BUCK file for ComponentKit #744

kostiadombrovsky opened this issue Feb 9, 2017 · 5 comments

Comments

@kostiadombrovsky
Copy link

It'd be nice to have BUCK file for ComponentKit

@ocrickard
Copy link
Contributor

This would be awesome. If anyone wants to submit a PR, I'd happily accept it.

@toulouse
Copy link
Contributor

toulouse commented Dec 18, 2017

@kostiadombrovsky -

@gkassabli plans to turn this from a rough draft into something a little bit more polished (note that it needs modification to point to yoga, so I don't think it will be merged until that can be accounted for), but here's a Buckfile one of our teams uses for ComponentKit.

exported_headers=[
    "ComponentKit/Base/CKAvailability.h",
    "ComponentKit/Base/CKAssert.h",
    "ComponentKit/Base/CKMacros.h",
    "ComponentKit/Base/CKArgumentPrecondition.h",
    "ComponentKit/HostingView/CKComponentRootView.h",
    "ComponentKit/HostingView/CKComponentRootViewInternal.h",
    "ComponentKit/HostingView/CKComponentFlexibleSizeRangeProvider.h",
    "ComponentKit/HostingView/CKComponentHostingView.h",
    "ComponentKit/HostingView/CKComponentHostingViewInternal.h",
    "ComponentKit/HostingView/CKComponentSizeRangeProviding.h",
    "ComponentKit/HostingView/CKComponentHostingViewDelegate.h",
    "ComponentKit/DataSources/CKSupplementaryViewDataSource.h",
    "ComponentKit/DataSources/Common/CKComponentAnnouncerHelper.h",
    "ComponentKit/DataSources/Common/CKComponentProvider.h",
    "ComponentKit/DataSources/Common/CKComponentAnnouncerBase.h",
    "ComponentKit/DataSources/Common/CKComponentAnnouncerBaseInternal.h",
    "ComponentKit/DataSources/Common/CKComponentDataSourceAttachController.h",
    "ComponentKit/DataSources/Common/CKComponentDataSourceAttachControllerInternal.h",
    "ComponentKit/DataSources/CKCollectionViewTransactionalDataSource.h",
    "ComponentKit/DataSources/CKCollectionViewDataSourceCell.h",
    "ComponentKit/DataSources/CKComponentBoundsAnimation+UICollectionView.h",
    "ComponentKit/Core/CKUpdateMode.h",
    "ComponentKit/Core/CKComponent+UIView.h",
    "ComponentKit/Core/CKComponentBoundsAnimationPredicates.h",
    "ComponentKit/Core/CKComponentViewConfiguration.h",
    "ComponentKit/Core/CKDimension.h",
    "ComponentKit/Core/CKCompositeComponent.h",
    "ComponentKit/Core/CKComponentBoundsAnimation.h",
    "ComponentKit/Core/ComponentMountContext.h",
    "ComponentKit/Core/CKBuildComponent.h",
    "ComponentKit/Core/CKComponentAnimation.h",
    "ComponentKit/Core/Scope/CKScopedComponentController.h",
    "ComponentKit/Core/Scope/CKComponentKey.h",
    "ComponentKit/Core/Scope/CKDetectComponentScopeCollisions.h",
    "ComponentKit/Core/Scope/CKComponentScopeRoot.h",
    "ComponentKit/Core/Scope/CKComponentScopeTypes.h",
    "ComponentKit/Core/Scope/CKComponentScopeFrame.h",
    "ComponentKit/Core/Scope/CKScopedComponent.h",
    "ComponentKit/Core/Scope/CKComponentScopeEnumeratorProvider.h",
    "ComponentKit/Core/Scope/CKComponentScopeHandle.h",
    "ComponentKit/Core/Scope/CKThreadLocalComponentScope.h",
    "ComponentKit/Core/Scope/CKComponentScopeRootFactory.h",
    "ComponentKit/Core/Scope/CKComponentScope.h",
    "ComponentKit/Core/CKComponentController.h",
    "ComponentKit/Core/CKComponentControllerInternal.h",
    "ComponentKit/Core/CKComponentAnimationHooks.h",
    "ComponentKit/Core/ComponentViewReuseUtilities.h",
    "ComponentKit/Core/CKComponentLayout.h",
    "ComponentKit/Core/CKComponentSize.h",
    "ComponentKit/Core/CKComponentControllerEvents.h",
    "ComponentKit/Core/ComponentViewManager.h",
    "ComponentKit/Core/ComponentUtilities.h",
    "ComponentKit/Core/ComponentLayoutContext.h",
    "ComponentKit/Core/CKComponentViewAttribute.h",
    "ComponentKit/Core/CKComponent.h",
    "ComponentKit/Core/CKComponentInternal.h",
    "ComponentKit/Core/CKComponentSubclass.h",
    "ComponentKit/Core/CKComponentMemoizer.h",
    "ComponentKit/Core/CKSizeRange.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceConfiguration.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceConfigurationInternal.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceState.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceStateInternal.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceListener.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSource.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceInternal.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceChangeset.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceChangesetInternal.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceAppliedChanges.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceListenerAnnouncer.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceItem.h",
    "ComponentKit/TransactionalDataSources/Common/CKDataSourceItemInternal.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceChangesetModification.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceChange.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceUpdateStateModification.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceReloadModification.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceUpdateConfigurationModification.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceStateModifying.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceChangesetVerification.h",
    "ComponentKit/Debug/CKComponentHierarchyDebugHelper.h",
    "ComponentKit/Debug/CKComponentDebugController.h",
    "ComponentKit/Debug/CKComponentDescriptionHelper.h",
    "ComponentKit/Utilities/CKComponentAction.h",
    "ComponentKit/Utilities/CKComponentActionInternal.h",
    "ComponentKit/Utilities/CKComponentContext.h",
    "ComponentKit/Utilities/CKComponentContextHelper.h",
    "ComponentKit/Utilities/CKComponentDelegateAttribute.h",
    "ComponentKit/Utilities/CKComponentDelegateForwarder.h",
    "ComponentKit/Utilities/CKComponentGestureActions.h",
    "ComponentKit/Utilities/CKComponentGestureActionsInternal.h",
    "ComponentKit/Utilities/CKContainerWrapper.h",
    "ComponentKit/Utilities/CKEqualityHashHelpers.h",
    "ComponentKit/Utilities/CKInternalHelpers.h",
    "ComponentKit/Utilities/CKInvalidChangesetOperationType.h",
    "ComponentKit/Utilities/CKMountAnimationGuard.h",
    "ComponentKit/Utilities/CKMutex.h",
    "ComponentKit/Utilities/CKOptimisticViewMutations.h",
    "ComponentKit/Utilities/CKWeakObjectContainer.h",
    "ComponentKit/LayoutComponents/CKFlexboxComponent.h",
    "ComponentKit/LayoutComponents/CKOverlayLayoutComponent.h",
    "ComponentKit/LayoutComponents/CKBackgroundLayoutComponent.h",
    "ComponentKit/LayoutComponents/CKInsetComponent.h",
    "ComponentKit/LayoutComponents/CKComponentLayoutBaseline.h",
    "ComponentKit/LayoutComponents/CKStaticLayoutComponent.h",
    "ComponentKit/LayoutComponents/CKRatioLayoutComponent.h",
    "ComponentKit/LayoutComponents/CKCenterLayoutComponent.h",
    "ComponentKit/Accessibility/CKComponentAccessibility.h",
    "ComponentKit/Components/CKAutoSizedImageComponent.h",
    "ComponentKit/Components/CKNetworkImageDownloading.h",
    "ComponentKit/Components/CKImageComponent.h",
    "ComponentKit/Components/CKMemoizingComponent.h",
    "ComponentKit/Components/CKNetworkImageComponent.h",
    "ComponentKit/Components/CKButtonComponent.h",
    "ComponentKit/StatefulViews/CKStatefulViewComponentController.h",
    "ComponentKit/StatefulViews/CKStatefulViewReusePool.h",
    "ComponentKit/StatefulViews/CKStatefulViewComponent.h",
    "ComponentKit/ComponentKit.h",
    "ComponentTextKit/CKTextComponent.h",
    "ComponentTextKit/CKTextComponentViewControlTracker.h",
    "ComponentTextKit/CKTextComponentView.h",
    "ComponentTextKit/CKTextComponentViewInternal.h",
    "ComponentTextKit/CKLabelComponent.h",
    "ComponentTextKit/CKTextComponentLayer.h",
    "ComponentTextKit/TextKit/CKTextKitAttributes.h",
    "ComponentTextKit/TextKit/CKTextKitEntityAttribute.h",
    "ComponentTextKit/TextKit/CKTextKitRendererCache.h",
    "ComponentTextKit/TextKit/CKTextKitTailTruncater.h",
    "ComponentTextKit/TextKit/CKTextKitRenderer+TextChecking.h",
    "ComponentTextKit/TextKit/CKTextKitTruncating.h",
    "ComponentTextKit/TextKit/CKTextKitRenderer.h",
    "ComponentTextKit/TextKit/CKTextKitContext.h",
    "ComponentTextKit/TextKit/CKTextKitRenderer+Positioning.h",
    "ComponentTextKit/TextKit/CKTextKitShadower.h",
    "ComponentTextKit/Utility/CKAsyncLayer.h",
    "ComponentTextKit/Utility/CKAsyncLayerInternal.h",
    "ComponentTextKit/Utility/CKHighlightOverlayLayer.h",
    "ComponentTextKit/Utility/CKAsyncTransactionGroup.h",
    "ComponentTextKit/Utility/CKCacheImpl.h",
    "ComponentTextKit/Utility/CKFunctor.h",
    "ComponentTextKit/Utility/CKAsyncTransactionContainer.h",
    "ComponentTextKit/Utility/CKAsyncLayerSubclass.h",
    "ComponentTextKit/Utility/CKAsyncTransaction.h",
    "ComponentTextKit/Utility/CKAsyncTransactionContainer+Private.h",
    "ComponentTextKit/CKTextComponentLayerHighlighter.h"]
headers = glob([
    "ComponentKit/Core/*.h",
    "ComponentKit/Core/Scope/*.h",
    "ComponentKit/Base/*.h",
    "ComponentKit/Utilities/*.h",
    "ComponentKit/TransactionalDataSources/Common/*.h",
    "ComponentKit/HostingView/*.h",
    "ComponentKit/DataSources/Common/*.h",
    "ComponentKit/Debug/*.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/*.h",
    "ComponentKit/Accessibility/*.h"])


apple_library(
    name="ComponentKit",
     visibility = ["//..."],
    srcs=[
        "ComponentKit/StatefulViews/CKStatefulViewComponentController.mm",
        "ComponentKit/StatefulViews/CKStatefulViewReusePool.mm",
        "ComponentKit/StatefulViews/CKStatefulViewComponent.mm",
        "ComponentKit/Components/CKAutoSizedImageComponent.mm",
        "ComponentKit/Components/CKImageComponent.mm",
        "ComponentKit/Components/CKButtonComponent.mm",
        "ComponentKit/Components/CKMemoizingComponent.mm",
        "ComponentKit/Components/CKNetworkImageComponent.mm",
        "ComponentKit/Accessibility/CKComponentAccessibility.mm",
        "ComponentKit/LayoutComponents/CKFlexboxComponent.mm",
        "ComponentKit/LayoutComponents/CKCenterLayoutComponent.mm",
        "ComponentKit/LayoutComponents/CKRatioLayoutComponent.mm",
        "ComponentKit/LayoutComponents/CKBackgroundLayoutComponent.mm",
        "ComponentKit/LayoutComponents/CKStaticLayoutComponent.mm",
        "ComponentKit/LayoutComponents/CKInsetComponent.mm",
        "ComponentKit/LayoutComponents/CKOverlayLayoutComponent.mm",
        "ComponentKit/Utilities/CKComponentDelegateForwarder.mm",
        "ComponentKit/Utilities/CKEqualityHashHelpers.mm",
        "ComponentKit/Utilities/CKComponentDelegateAttribute.mm",
        "ComponentKit/Utilities/CKInternalHelpers.mm",
        "ComponentKit/Utilities/CKComponentGestureActions.mm",
        "ComponentKit/Utilities/CKComponentContextHelper.mm",
        "ComponentKit/Utilities/CKComponentAction.mm",
        "ComponentKit/Utilities/CKInvalidChangesetOperationType.mm",
        "ComponentKit/Utilities/CKOptimisticViewMutations.mm",
        "ComponentKit/Debug/CKComponentHierarchyDebugHelper.mm",
        "ComponentKit/Debug/ComponentKit+QuickLook.mm",
        "ComponentKit/Debug/CKComponentDebugController.mm",
        "ComponentKit/Debug/CKComponentDescriptionHelper.mm",
        "ComponentKit/TransactionalDataSources/Common/CKDataSourceConfiguration.mm",
        "ComponentKit/TransactionalDataSources/Common/CKDataSourceState.mm",
        "ComponentKit/TransactionalDataSources/Common/CKDataSourceAppliedChanges.mm",
        "ComponentKit/TransactionalDataSources/Common/CKDataSourceChangeset.mm",
        "ComponentKit/TransactionalDataSources/Common/CKDataSource.mm",
        "ComponentKit/TransactionalDataSources/Common/CKDataSourceItem.mm",
        "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceUpdateStateModification.mm",
        "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceChangesetVerification.mm",
        "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceUpdateConfigurationModification.mm",
        "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceChangesetModification.mm",
        "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceReloadModification.mm",
        "ComponentKit/TransactionalDataSources/Common/CKDataSourceListenerAnnouncer.mm",
        "ComponentKit/Core/CKComponentMemoizer.mm",
        "ComponentKit/Core/ComponentLayoutContext.mm",
        "ComponentKit/Core/CKDimension.mm",
        "ComponentKit/Core/CKComponentController.mm",
        "ComponentKit/Core/CKComponentAnimation.mm",
        "ComponentKit/Core/CKComponentViewConfiguration.mm",
        "ComponentKit/Core/CKBuildComponent.mm",
        "ComponentKit/Core/CKSizeRange.mm",
        "ComponentKit/Core/CKComponent+UIView.mm",
        "ComponentKit/Core/CKComponentBoundsAnimationPredicates.mm",
        "ComponentKit/Core/ComponentViewManager.mm",
        "ComponentKit/Core/Scope/CKComponentKey.mm",
        "ComponentKit/Core/Scope/CKDetectComponentScopeCollisions.mm",
        "ComponentKit/Core/Scope/CKComponentScopeHandle.mm",
        "ComponentKit/Core/Scope/CKThreadLocalComponentScope.mm",
        "ComponentKit/Core/Scope/CKComponentScopeFrame.mm",
        "ComponentKit/Core/Scope/CKComponentScopeRootFactory.mm",
        "ComponentKit/Core/Scope/CKComponentScopeRoot.mm",
        "ComponentKit/Core/Scope/CKComponentScope.mm",
        "ComponentKit/Core/CKComponentSize.mm",
        "ComponentKit/Core/CKComponentBoundsAnimation.mm",
        "ComponentKit/Core/CKCompositeComponent.mm",
        "ComponentKit/Core/CKComponentViewAttribute.mm",
        "ComponentKit/Core/ComponentViewReuseUtilities.mm",
        "ComponentKit/Core/CKComponentControllerEvents.mm",
        "ComponentKit/Core/CKComponent.mm",
        "ComponentKit/Core/CKComponentLayout.mm",
        "ComponentKit/DataSources/CKCollectionViewTransactionalDataSource.mm",
        "ComponentKit/DataSources/Common/CKComponentDataSourceAttachController.mm",
        "ComponentKit/DataSources/Common/CKComponentAnnouncerHelper.mm",
        "ComponentKit/DataSources/Common/CKComponentAnnouncerBase.mm",
        "ComponentKit/DataSources/CKComponentBoundsAnimation+UICollectionView.mm",
        "ComponentKit/HostingView/CKComponentHostingView.mm",
        "ComponentKit/HostingView/CKComponentFlexibleSizeRangeProvider.mm",
        "ComponentKit/HostingView/CKComponentRootView.m",
        "ComponentKit/DataSources/CKCollectionViewDataSourceCell.m",
        "ComponentKit/TransactionalDataSources/Common/Internal/CKDataSourceChange.m",
        "ComponentKit/Utilities/CKWeakObjectContainer.m",
        "ComponentKit/LayoutComponents/CKComponentLayoutBaseline.m"],
    exported_headers = exported_headers,
    headers = set(headers).discard(set(exported_headers)),
    preferred_linkage = 'static',
    compiler_flags = ["-O2", "-Werror", "-Wno-unknown-warning-option",
         "-fobjc-arc",
        "-Wno-missing-property-synthesis",
        "-Wno-objc-missing-property-synthesis",
        "-Wno-mismatched-tags",
        "-Wno-sign-compare",
        "-Wno-missing-field-initializers"],
    deps = [ "//path/to/yoga:yoga" ],
    frameworks= [
        "$SDKROOT/System/Library/Frameworks/UIKit.framework",
        "$SDKROOT/System/Library/Frameworks/Foundation.framework",
        "$SDKROOT/System/Library/Frameworks/QuartzCore.framework",
        "$SDKROOT/System/Library/Frameworks/CoreGraphics.framework"]
)

@sdkitono
Copy link

sdkitono commented May 14, 2019

Hiya I'm trying to compile ComponentKit with Buck but i have the following output
ComponentKit/ComponentKit/Core/Scope/CKComponentScopeRoot.h:15:9: fatal error: 'ComponentKit/CKAnalyticsListener.h' file not found #import <ComponentKit/CKAnalyticsListener.h>

This is my BUCK file

headers = glob([
    "ComponentKit/Core/*.h",
    "ComponentKit/Core/Scope/*.h",
    "ComponentKit/Base/*.h",
    "ComponentKit/Utilities/*.h",
    "ComponentKit/TransactionalDataSources/Common/*.h",
    "ComponentKit/HostingView/*.h",
    "ComponentKit/DataSources/Common/*.h",
    "ComponentKit/Debug/*.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/*.h",
    "ComponentKit/Accessibility/*.h"])

apple_library(
    name="ComponentKit",
    visibility = ["PUBLIC"],
    srcs=glob([
    "ComponentKit/Core/*.mm",
    "ComponentKit/Core/Scope/*.mm",
    "ComponentKit/Base/*.mm",
    "ComponentKit/Utilities/*.mm",
    "ComponentKit/TransactionalDataSources/Common/*.mm",
    "ComponentKit/HostingView/*.mm",
    "ComponentKit/DataSources/Common/*.mm",
    "ComponentKit/Debug/*.mm",
    "ComponentKit/TransactionalDataSources/Common/Internal/*.mm",
    "ComponentKit/Accessibility/*.mm"]),
    exported_headers = headers,
    headers = headers,
    preferred_linkage = 'static',
    header_path_prefix = 'ComponentKit',
    compiler_flags = ["-O2", "-Werror", "-Wno-unknown-warning-option",
         "-fobjc-arc",
        "-Wno-missing-property-synthesis",
        "-Wno-objc-missing-property-synthesis",
        "-Wno-mismatched-tags",
        "-Wno-sign-compare",
        "-Wno-missing-field-initializers"],
    deps = [ "//yoga:yoga" ],
    frameworks= [
        "$SDKROOT/System/Library/Frameworks/UIKit.framework",
        "$SDKROOT/System/Library/Frameworks/Foundation.framework",
        "$SDKROOT/System/Library/Frameworks/QuartzCore.framework",
        "$SDKROOT/System/Library/Frameworks/CoreGraphics.framework"]
)

Can you guys help?

@sdkitono
Copy link

So I kinda have something almost working now... If I do not add the exported_headers ComponentKit can be built.

Now I have this error

ComponentKit/ComponentKit/Core/ComponentUtilities.h:11:9: fatal error: 'algorithm' file not found

headers = glob([
    "ComponentKit/Core/*.h",
    "ComponentKit/Core/Scope/*.h",
    "ComponentKit/Core/Render/*.h",
    "ComponentKit/Core/ComponentTree/**/*.h",
    "ComponentKit/Base/*.h",
    "ComponentKit/Utilities/*.h",
    "ComponentKit/TransactionalDataSources/Common/*.h",
    "ComponentKit/HostingView/*.h",
    "ComponentKit/DataSources/Common/*.h",
    "ComponentKit/Debug/*.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/*.h",
    "ComponentKit/Accessibility/*.h",
    "ComponentKit/Analytics/*.h",
    "ComponentKit/*.h"])

apple_library(
    name="ComponentKit",
    visibility = ["PUBLIC"],
    srcs=glob([
    "ComponentKit/Core/*.mm",
    "ComponentKit/Core/Scope/*.mm",
    "ComponentKit/Base/*.mm",
    "ComponentKit/Utilities/*.mm",
    "ComponentKit/Utilities/*.m",
    "ComponentKit/TransactionalDataSources/Common/*.mm",
    "ComponentKit/HostingView/*.mm",
    "ComponentKit/DataSources/Common/*.mm",
    "ComponentKit/Debug/*.mm",
    "ComponentKit/TransactionalDataSources/Common/Internal/*.mm",
    "ComponentKit/TransactionalDataSources/Common/Internal/*.m",
    "ComponentKit/Accessibility/*.mm",
    "ComponentKit/Analytics/*.mm",
    "ComponentKit/Core/ComponentTree/**/*.mm"]),
    exported_headers = headers,
    headers = headers,
    preferred_linkage = 'static',
    header_path_prefix = 'ComponentKit',
    compiler_flags = ["-O2", "-Werror", "-Wno-unknown-warning-option",
         "-fobjc-arc",
        "-Wno-missing-property-synthesis",
        "-Wno-objc-missing-property-synthesis",
        "-Wno-mismatched-tags",
        "-Wno-sign-compare",
        "-Wno-missing-field-initializers",
        "-Wno-deprecated-declarations"],
    deps = [ "//yoga:yoga" ],
    frameworks= [
        "$SDKROOT/System/Library/Frameworks/UIKit.framework",
        "$SDKROOT/System/Library/Frameworks/Foundation.framework",
        "$SDKROOT/System/Library/Frameworks/QuartzCore.framework",
        "$SDKROOT/System/Library/Frameworks/CoreGraphics.framework"]
)

Any advice?

@sdkitono
Copy link

Hi Guys I have got it working... The fix was apparently to make sure that the file that is importing #import <ComponentKit/ComponentKit.h> has to be a .mm file so that it can be compiled with the c++ standard library. Fun bug.

And if anyone looking to do this here is my full BUCK file for ComponentKit

headers = glob([
    "ComponentKit/Core/*.h",
    "ComponentKit/Core/Scope/*.h",
    "ComponentKit/Core/Render/*.h",
    "ComponentKit/Components/*.h",
    "ComponentKit/DataSources/*.h",
    "ComponentKit/Core/ComponentTree/**/*.h",
    "ComponentKit/Base/*.h",
    "ComponentKit/Utilities/*.h",
    "ComponentKit/TransactionalDataSources/Common/*.h",
    "ComponentKit/HostingView/*.h",
    "ComponentKit/DataSources/Common/*.h",
    "ComponentKit/Debug/*.h",
    "ComponentKit/TransactionalDataSources/Common/Internal/*.h",
    "ComponentKit/Accessibility/*.h",
    "ComponentKit/Analytics/*.h",
    "ComponentKit/LayoutComponents/*.h",
    "ComponentTextKit/**/*.h",
    "ComponentKit/*.h"])

apple_library(
    name="ComponentKit",
    visibility = ["PUBLIC"],
    srcs=glob([
    "ComponentKit/Core/*.mm",
    "ComponentKit/Core/Scope/*.mm",
    "ComponentKit/Core/Render/*.mm",
    "ComponentKit/Components/*.mm",
    "ComponentKit/DataSources/*.mm",
    "ComponentKit/DataSources/*.m",
    "ComponentKit/Base/*.mm",
    "ComponentKit/Utilities/*.mm",
    "ComponentKit/Utilities/*.m",
    "ComponentKit/TransactionalDataSources/Common/*.mm",
    "ComponentKit/HostingView/*.mm",
    "ComponentKit/DataSources/Common/*.mm",
    "ComponentKit/Debug/*.mm",
    "ComponentKit/TransactionalDataSources/Common/Internal/*.mm",
    "ComponentKit/TransactionalDataSources/Common/Internal/*.m",
    "ComponentKit/Accessibility/*.mm",
    "ComponentKit/Analytics/*.mm",
    "ComponentKit/LayoutComponents/*.mm",
    "ComponentKit/LayoutComponents/*.m",
    "ComponentTextKit/**/*.mm",
    "ComponentKit/Core/ComponentTree/**/*.mm"]),
    exported_headers = headers,
    headers = headers,
    preferred_linkage = 'static',
    header_path_prefix = 'ComponentKit',
    compiler_flags = ["-O2", "-Werror", "-Wno-unknown-warning-option",
         "-fobjc-arc",
        "-Wno-missing-property-synthesis",
        "-Wno-objc-missing-property-synthesis",
        "-Wno-mismatched-tags",
        "-Wno-sign-compare",
        "-Wno-missing-field-initializers",
        "-Wno-deprecated-declarations"],
    deps = [ "//yoga:yoga" ],
    frameworks= [
        "$SDKROOT/System/Library/Frameworks/UIKit.framework",
        "$SDKROOT/System/Library/Frameworks/Foundation.framework",
        "$SDKROOT/System/Library/Frameworks/QuartzCore.framework",
        "$SDKROOT/System/Library/Frameworks/CoreGraphics.framework",
        "$SDKROOT/System/Library/Frameworks/CoreText.framework"]
)

If anyone wants a full source code, let me know and I will post a repo to Github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants