Skip to content

Commit

Permalink
Fixes modular import with #if CK_NOT_SWIFT
Browse files Browse the repository at this point in the history
  • Loading branch information
cuva committed Apr 30, 2021
1 parent 8cfc9b5 commit e6aad87
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 10 deletions.
5 changes: 5 additions & 0 deletions ComponentKit/Components/CKAnimationComponent+Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/

#import <ComponentKit/CKAnimationComponent.h>
#import <ComponentKit/CKDefines.h>

#if CK_NOT_SWIFT

@interface CKAnimationComponent (Internal)

Expand All @@ -23,3 +26,5 @@
animationOnFinalUnmount:(CAAnimation *)animationOnFinalUnmount;

@end

#endif
6 changes: 6 additions & 0 deletions ComponentKit/Core/CKComponentAnimationPredicates.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
*
*/

#import <ComponentKit/CKDefines.h>

#if CK_NOT_SWIFT

#import <unordered_set>

#import <ComponentKit/CKComponentScopeTypes.h>

auto CKComponentAnimationPredicates() -> std::unordered_set<CKMountablePredicate>;

#endif
5 changes: 5 additions & 0 deletions ComponentKit/Core/CKMountAnimationGuard.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/

#import <QuartzCore/QuartzCore.h>
#import <ComponentKit/CKDefines.h>

#if CK_NOT_SWIFT

/** Used by CKComponent internally to block animations when configuring a new or recycled view */
class CKMountAnimationGuard {
Expand Down Expand Up @@ -73,3 +76,5 @@ class CKMountAnimationGuard {
return NO;
}
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
*
*/

#import <ComponentKit/CKDefines.h>
#import <ComponentKit/CKComponentSize_SwiftBridge.h>

#import <ComponentKit/CKComponentSize.h>

#if CK_NOT_SWIFT

NS_ASSUME_NONNULL_BEGIN

@interface CKComponentSize_SwiftBridge ()
Expand All @@ -21,3 +24,5 @@ NS_ASSUME_NONNULL_BEGIN
@end

NS_ASSUME_NONNULL_END

#endif
4 changes: 4 additions & 0 deletions ComponentKit/Core/Swift/CKDimension_SwiftBridge+Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#import <ComponentKit/CKDimension.h>

#if CK_NOT_SWIFT

NS_ASSUME_NONNULL_BEGIN

@interface CKDimension_SwiftBridge ()
Expand All @@ -23,3 +25,5 @@ NS_ASSUME_NONNULL_BEGIN
@end

NS_ASSUME_NONNULL_END

#endif
5 changes: 5 additions & 0 deletions ComponentKit/Core/Swift/CKSizeRange_SwiftBridge+Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
*
*/

#import <ComponentKit/CKDefines.h>
#import <ComponentKit/CKSizeRange_SwiftBridge.h>

#import <ComponentKit/CKSizeRange.h>

#if CK_NOT_SWIFT

NS_ASSUME_NONNULL_BEGIN

@interface CKSizeRange_SwiftBridge ()
Expand All @@ -23,3 +26,5 @@ NS_ASSUME_NONNULL_BEGIN
@end

NS_ASSUME_NONNULL_END

#endif
3 changes: 3 additions & 0 deletions ComponentKit/DataSources/CKCollectionViewDataSourceCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@

#import <UIKit/UIKit.h>

#import <ComponentKit/CKDefines.h>
#import <ComponentKit/CKNonNull.h>

@class CKComponentRootView;

@interface CKCollectionViewDataSourceCell : UICollectionViewCell
#if CK_NOT_SWIFT
@property (nonatomic, assign, readonly) CK::NonNull<CKComponentRootView *> rootView;
#endif
@end
4 changes: 0 additions & 4 deletions ComponentKit/DataSources/CKCollectionViewDataSourceListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#import <ComponentKit/CKDefines.h>

#if CK_NOT_SWIFT

@class CKCollectionViewDataSource;
@class CKDataSourceAppliedChanges;
@class CKDataSourceState;
Expand All @@ -33,5 +31,3 @@
withState:(CKDataSourceState *)state;

@end

#endif
6 changes: 0 additions & 6 deletions ComponentKit/DataSources/Common/CKComponentAnnouncerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
*
*/

#import <ComponentKit/CKDefines.h>

#if CK_NOT_SWIFT

#import <Foundation/Foundation.h>

/**
Expand All @@ -23,5 +19,3 @@
*/
@interface CKComponentAnnouncerBase : NSObject
@end

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@

#import <Foundation/Foundation.h>

#import <ComponentKit/CKDefines.h>
#import <ComponentKit/CKDataSource.h>
#import <ComponentKit/CKDataSourceStateModifying.h>

#if CK_NOT_SWIFT

@class CKDataSourceChangeset;

@protocol CKComponentStateListener;
Expand All @@ -28,3 +31,5 @@
@property (nonatomic, readonly, strong) CKDataSourceChangeset *changeset;

@end

#endif

0 comments on commit e6aad87

Please sign in to comment.