-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHTNetworking.podspec
executable file
·166 lines (164 loc) · 7.27 KB
/
HTNetworking.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
Pod::Spec.new do |s|
s.name = "HTNetworking"
s.version = "0.2.0"
s.summary = "HTNetworking is a high level request util based on AFNetworking and RestKit."
s.homepage = "https://github.com/NEYouFan/HTNetworking"
s.license = "Apache License, Version 2.0"
s.source = { :git => "https://github.com/NEYouFan/ht-networking.git", :tag => "v#{s.version}"}
s.author = { "wlp" => "[email protected]" }
s.requires_arc = true
# Platform setup
s.ios.deployment_target = '7.0'
# TODO: Currently it does not support osx as it depends HTCommonUtility and HTCommonUtility doesn't support osx.
# s.osx.deployment_target = '10.8'
# Add Core Data to the PCH if the Core Data subspec is imported. This enables conditional compilation to kick in.
s.prefix_header_contents = <<-EOS
#if __has_include("RKCoreData.h")
#import <CoreData/CoreData.h>
#endif
EOS
# Preserve the layout of headers in the Code directory. HTHttp/HTHttp下的文件夹保持原有的文件夹组织结构
#s.header_mappings_dir = 'HTHttp/HTHttp'
s.subspec 'HT' do |ht|
ht.name = 'HT'
ht.dependency 'HTNetworking/HTRestKit'
ht.header_mappings_dir = 'HTHttp/HTHttp/HTHttp'
#ht.header_mappings_dir = 'HTHttp/HTHttp'
# CocoaPods 1.0不再可以指定default_subspec
#ht.default_subspec = 'PublicHeaders'
#ht.subspec 'PublicHeaders' do |htp|
# htp.source_files = 'HTHttp/HTHttp/HThttp/HTNetworking.h',
# 'HTHttp/HTHttp/HThttp/HTAutoBaseRequest.h',
# 'HTHttp/HTHttp/HThttp/HTBaseRequest.h',
# 'HTHttp/HTHttp/HThttp/HTHTTPModel.h',
# 'HTHttp/HTHttp/HThttp/NSObject+HTModel.h'
# htp.header_mappings_dir = 'HTHttp/HTHttp/HTHttp'
# htp.dependency 'HTNetworking/HTRestKit/Core'
# #htp.dependency 'HTNetworking/HT/Core'
#end
#ht.subspec 'Core' do |hto|
# hto.source_files = 'HTHttp/HTHttp/HThttp/Core/*.{h,m}'
# hto.dependency 'HTNetworking/HT/PublicHeaders'
# hto.dependency 'HTNetworking/HT/Cache'
# hto.dependency 'HTNetworking/HT/Freeze'
# hto.dependency 'HTNetworking/HT/RACSupport'
# hto.dependency 'HTNetworking/HT/Support'
# hto.dependency 'AFDownloadRequestOperation', '~> 2.0'
#end
ht.subspec 'Core' do |hto|
hto.source_files = 'HTHttp/HTHttp/HThttp/Core/*.{h,m}',
'HTHttp/HTHttp/HThttp/HTNetworking.h',
'HTHttp/HTHttp/HThttp/HTAutoBaseRequest.h',
'HTHttp/HTHttp/HThttp/HTBaseRequest.h',
'HTHttp/HTHttp/HThttp/HTHTTPModel.h',
'HTHttp/HTHttp/HThttp/NSObject+HTModel.h'
#hto.header_mappings_dir = 'HTHttp/HTHttp/HTHttp'
#hto.dependency 'HTNetworking/HT/PublicHeaders'
hto.dependency 'HTNetworking/HTRestKit/Core'
hto.dependency 'HTNetworking/HT/Cache'
hto.dependency 'HTNetworking/HT/Freeze'
hto.dependency 'HTNetworking/HT/RACSupport'
hto.dependency 'HTNetworking/HT/Support'
hto.dependency 'AFDownloadRequestOperation', '~> 2.0'
end
ht.subspec 'Cache' do |htc|
htc.source_files = 'HTHttp/HTHttp/HThttp/Cache/*.{h,m}'
htc.dependency 'HTNetworking/HT/Support'
htc.dependency 'HTNetworking/HTRestKit'
htc.dependency 'FMDB'
htc.dependency 'HTCommonUtility'
end
ht.subspec 'Freeze' do |htf|
htf.source_files = 'HTHttp/HTHttp/HThttp/Freeze/*.{h,m}'
htf.dependency 'HTNetworking/HT/Cache'
htf.dependency 'HTNetworking/HTRestKit'
end
ht.subspec 'RACSupport' do |htr|
htr.source_files = 'HTHttp/HTHttp/HThttp/RACSupport/*.{h,m}'
htr.dependency 'ReactiveCocoa', '~> 2.1'
htr.dependency 'HTCommonUtility'
htr.dependency 'HTNetworking/HT/Support'
htr.dependency 'HTNetworking/HTRestKit'
end
ht.subspec 'Support' do |hts|
hts.source_files = 'HTHttp/HTHttp/HThttp/Support/*.{h,m}'
hts.dependency 'HTCommonUtility'
end
end
s.subspec 'HTRestKit' do |rs|
rs.name = 'HTRestKit'
#rs.default_subspec = 'Core'
# Preserve the layout of headers in the 'HTHttp/RestKit/Code' directory and map to header_dir 'RestKit'
rs.header_mappings_dir = 'HTHttp/RestKit/Code'
rs.header_dir = 'RestKit'
rs.subspec 'Core' do |cs|
cs.dependency 'HTNetworking/HTRestKit/ObjectMapping'
cs.dependency 'HTNetworking/HTRestKit/Network'
cs.dependency 'HTNetworking/HTRestKit/CoreData'
end
rs.subspec 'ObjectMapping' do |os|
os.source_files = 'HTHTTP/RestKit/Code/ObjectMapping.h', 'HTHTTP/RestKit/Code/ObjectMapping/**/*'
os.dependency 'HTNetworking/HTRestKit/Support'
os.dependency 'RKValueTransformers', '~> 1.1.0'
os.dependency 'ISO8601DateFormatterValueTransformer', '~> 0.6.1'
end
rs.subspec 'Network' do |ns|
ns.source_files = 'HTHTTP/RestKit/Code/Network.h', 'HTHTTP/RestKit/Code/Network/**/*'
ns.ios.frameworks = 'CFNetwork', 'Security', 'MobileCoreServices', 'SystemConfiguration'
ns.osx.frameworks = 'CoreServices', 'Security', 'SystemConfiguration'
ns.dependency 'SOCKit'
ns.dependency "AFNetworking", "~> 2.5"
ns.dependency 'HTNetworking/HTRestKit/ObjectMapping'
ns.dependency 'HTNetworking/HTRestKit/Support'
ns.prefix_header_contents = <<-EOS
#import <Availability.h>
#define _AFNETWORKING_PIN_SSL_CERTIFICATES_
#if __IPHONE_OS_VERSION_MIN_REQUIRED
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <Security/Security.h>
#else
#import <SystemConfiguration/SystemConfiguration.h>
#import <CoreServices/CoreServices.h>
#import <Security/Security.h>
#endif
EOS
end
rs.subspec 'CoreData' do |cdos|
cdos.source_files = 'HTHTTP/RestKit/Code/CoreData.h', 'HTHTTP/RestKit/Code/CoreData/**/*'
cdos.frameworks = 'CoreData'
cdos.dependency 'HTNetworking/HTRestKit/ObjectMapping'
end
rs.subspec 'Testing' do |ts|
ts.source_files = 'HTHTTP/RestKit/Code/Testing.h', 'HTHTTP/RestKit/Code/Testing'
ts.dependency 'HTNetworking/HTRestKit/Network'
ts.prefix_header_contents = <<-EOS
#import <Availability.h>
#define _AFNETWORKING_PIN_SSL_CERTIFICATES_
#if __IPHONE_OS_VERSION_MIN_REQUIRED
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <Security/Security.h>
#else
#import <SystemConfiguration/SystemConfiguration.h>
#import <CoreServices/CoreServices.h>
#import <Security/Security.h>
#endif
EOS
end
rs.subspec 'Search' do |rss|
rss.source_files = 'HTHTTP/RestKit/Code/Search.h', 'HTHTTP/RestKit/Code/Search'
rss.dependency 'HTNetworking/HTRestKit/CoreData'
end
rs.subspec 'Support' do |ss|
ss.source_files = 'HTHTTP/RestKit/Code/RestKit.h', 'HTHTTP/RestKit/Code/Support.h', 'HTHTTP/RestKit/Code/Support'
ss.dependency 'TransitionKit', '~> 2.2'
end
rs.subspec 'CocoaLumberjack' do |cl|
cl.source_files = 'HTHTTP/RestKit/Code/CocoaLumberjack/RKLumberjackLogger.*'
# Note: CocoaLumberjack 3.0 is not supported yet as HTNetworking does not support framework-style yet.
cl.dependency 'CocoaLumberjack', '~> 2.0'
cl.dependency 'HTNetworking/HTRestKit/Support'
end
end
end