forked from modo-studio/SugarRecord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSugarRecord.podspec
133 lines (113 loc) · 5.19 KB
/
SugarRecord.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
Pod::Spec.new do |s|
s.name = "SugarRecord"
s.version = "2.2.2"
s.summary = "CoreData wrapper written on Swift"
s.homepage = "https://github.com/pepibumur/SugarRecord"
s.license = 'MIT'
s.author = { "Pedro" => "[email protected]" }
s.source = { :git => "https://github.com/pepibumur/SugarRecord.git", :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/pepibumur'
s.requires_arc = true
s.default_subspecs = 'Realm', 'CoreData'
s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.10"
rx_dependencies = lambda do |spec|
spec.dependency 'RxSwift', '~> 2.1'
spec.dependency 'RxCocoa', '~> 2.1'
spec.dependency 'RxBlocking', '~> 2.1'
end
rac_dependencies = lambda do |spec|
spec.dependency "ReactiveCocoa", "4.0.1"
end
realm_dependencies = lambda do |spec|
spec.dependency "RealmSwift", "~> 0.98"
end
coredata_dependencies = lambda do |spec|
spec.frameworks = ['CoreData']
end
foundation_dependencies = lambda do |spec|
spec.dependency "Result", "~> 1.0"
end
all_platforms = lambda do |spec|
spec.ios.deployment_target = "8.0"
spec.osx.deployment_target = "10.10"
spec.watchos.deployment_target = "2.0"
spec.tvos.deployment_target = '9.0'
end
excluded_icloud_files = ['SugarRecord/Source/CoreData/Entities/iCloudConfig.swift', 'SugarRecord/Source/CoreData/Storages/CoreDataiCloudStorage.swift']
s.subspec "CoreData" do |spec|
source_files = ['SugarRecord/Source/Foundation/**/*.{swift}', 'SugarRecord/Source/CoreData/**/*.{swift}']
excluded_files = ['SugarRecord/Source/CoreData/Reactive/**/*.{swift}']
spec.source_files = source_files
spec.exclude_files = excluded_files + excluded_icloud_files
coredata_dependencies.call(spec)
foundation_dependencies.call(spec)
all_platforms.call(spec)
end
s.subspec "CoreData+iCloud" do |spec|
source_files = ['SugarRecord/Source/Foundation/**/*.{swift}', 'SugarRecord/Source/CoreData/**/*.{swift}']
excluded_files = ['SugarRecord/Source/CoreData/Reactive/**/*.{swift}']
spec.source_files = source_files
spec.exclude_files = excluded_files
coredata_dependencies.call(spec)
foundation_dependencies.call(spec)
end
s.subspec "CoreData+RX" do |spec|
source_files = ['SugarRecord/Source/Foundation/**/*.{swift}', 'SugarRecord/Source/CoreData/**/*.{swift}', 'SugarRecord/Source/Reactive/**/*.{swift}']
excluded_files = ['SugarRecord/Source/Reactive/ReactiveCocoa/**/*.{swift}']
spec.source_files = source_files
spec.exclude_files = excluded_files + excluded_icloud_files
rx_dependencies.call(spec)
coredata_dependencies.call(spec)
foundation_dependencies.call(spec)
all_platforms.call(spec)
end
s.subspec "CoreData+RX+iCloud" do |spec|
source_files = ['SugarRecord/Source/Foundation/**/*.{swift}', 'SugarRecord/Source/CoreData/**/*.{swift}', 'SugarRecord/Source/Reactive/**/*.{swift}']
excluded_files = ['SugarRecord/Source/Reactive/ReactiveCocoa/**/*.{swift}']
spec.source_files = source_files
spec.exclude_files = excluded_files
rx_dependencies.call(spec)
coredata_dependencies.call(spec)
foundation_dependencies.call(spec)
end
s.subspec "CoreData+RAC" do |spec|
source_files = ['SugarRecord/Source/Foundation/**/*.{swift}', 'SugarRecord/Source/CoreData/**/*.{swift}', 'SugarRecord/Source/Reactive/**/*.{swift}']
excluded_files = ['SugarRecord/Source/Reactive/Rx/**/*.{swift}']
spec.source_files = source_files
spec.exclude_files = excluded_files + excluded_icloud_files
rac_dependencies.call(spec)
coredata_dependencies.call(spec)
foundation_dependencies.call(spec)
all_platforms.call(spec)
end
s.subspec "CoreData+RAC+iCloud" do |spec|
source_files = ['SugarRecord/Source/Foundation/**/*.{swift}', 'SugarRecord/Source/CoreData/**/*.{swift}', 'SugarRecord/Source/Reactive/**/*.{swift}']
excluded_files = ['SugarRecord/Source/Reactive/Rx/**/*.{swift}']
spec.source_files = source_files
spec.exclude_files = excluded_files
rac_dependencies.call(spec)
coredata_dependencies.call(spec)
foundation_dependencies.call(spec)
end
s.subspec "Realm" do |spec|
spec.source_files = ['SugarRecord/Source/Foundation/**/*.{swift}', 'SugarRecord/Source/Realm/**/*.{swift}']
spec.exclude_files = ['SugarRecord/Source/Realm/Reactive/**/*.{swift}']
realm_dependencies.call(spec)
foundation_dependencies.call(spec)
end
s.subspec "Realm+RX" do |spec|
spec.source_files = ['SugarRecord/Source/Foundation/**/*.{swift}', 'SugarRecord/Source/Realm/**/*.{swift}', 'SugarRecord/Source/Reactive/**/*.{swift}']
spec.exclude_files = ['SugarRecord/Source/Reactive/ReactiveCocoa/**/*.{swift}']
rx_dependencies.call(spec)
realm_dependencies.call(spec)
foundation_dependencies.call(spec)
end
s.subspec "Realm+RAC" do |spec|
spec.source_files = ['SugarRecord/Source/Foundation/**/*.{swift}', 'SugarRecord/Source/Realm/**/*.{swift}', 'SugarRecord/Source/Reactive/**/*.{swift}']
spec.exclude_files = ['SugarRecord/Source/Reactive/Rx/**/*.{swift}']
rac_dependencies.call(spec)
realm_dependencies.call(spec)
foundation_dependencies.call(spec)
end
end