-
Notifications
You must be signed in to change notification settings - Fork 180
/
Hummer.podspec
130 lines (112 loc) · 4.6 KB
/
Hummer.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
#
# Be sure to run `pod lib lint Hummer.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'Hummer'
s.version = '0.2.8'
s.summary = 'Hummer'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
Hummer is a dynamic solution for client.
DESC
s.homepage = 'https://github.com/didi/Hummer'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'Apache-2.0', :file => 'LICENSE' }
s.author = { 'ChasonTang' => '[email protected]' }
s.source = { :git => 'https://github.com/didi/Hummer.git', :tag => s.version.to_s }
s.prepare_command = <<-CMD
curl -o napi_ios.tar.gz -L https://github.com/OrangeLab/N-API/releases/download/2.1.1/napi_ios.tar.gz
tar zxf napi_ios.tar.gz
rm -f napi_ios.tar.gz
CMD
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '9.0'
s.default_subspec = "Core"
s.subspec "N-API" do |ss|
ss.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' => "$(PODS_TARGET_SRCROOT)/include"
}
ss.preserve_paths = 'include/napi/*.{h,def}'
ss.source_files = 'iOS/Hummer/Classes/Engine/N-API/*.{h,m,mm}'
ss.private_header_files = 'iOS/Hummer/Classes/Engine/N-API/HMNAPIDebuggerHelper.h', 'iOS/Hummer/Classes/Engine/N-API/HMJSExecutor+Private.h', 'iOS/Hummer/Classes/Engine/N-API/HMJS{Weak,Strong}Value.h', 'iOS/Hummer/Classes/Engine/N-API/HMJSValue.h'
end
s.subspec "Hermes" do |ss|
ss.dependency 'Hummer/Core'
ss.dependency 'Hummer/N-API'
ss.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' => "$(PODS_TARGET_SRCROOT)/iOS",
'GCC_ENABLE_CPP_EXCEPTIONS' => 'NO',
'GCC_ENABLE_CPP_RTTI' => 'NO'
}
ss.vendored_library = 'libhermes.a'
ss.library = 'c++'
ss.framework = 'CoreFoundation'
ss.source_files = 'iOS/Hermes/*.{h,m,mm}'
ss.dependency 'SocketRocket', '~> 0.1'
ss.private_header_files = 'iOS/Hermes/RCTMessageThread.h'
ss.preserve_path = 'iOS/jsinspector/InspectorInterfaces.h'
end
s.subspec "JavaScriptCore" do |ss|
ss.dependency 'Hummer/Core'
ss.dependency 'Hummer/N-API'
ss.vendored_library = 'libjsc.a'
ss.framework = "JavaScriptCore"
end
# s.subspec "QuickJS" do |ss|
# ss.dependency 'Hummer/Core'
# ss.dependency 'Hummer/N-API'
# ss.vendored_library = 'libquickjs.a'
# end
s.subspec "Core" do |ss|
ss.source_files = 'iOS/Hummer/Classes/**/*.{h,m,cpp}'
ss.exclude_files = 'iOS/Hummer/Classes/Engine/N-API/*.{h,m,mm}', 'iOS/Hummer/Classes/Core/Manager/ImageLoader/Decoder/ConcreteCoder/Webp/HMWebpImageCoder.{h,m}', 'iOS/Hummer/Classes/Component/Views/Lottie/**/*.{h,m,Swift}'
ss.resource_bundles = {
'Hummer' => ['iOS/Hummer/Assets/Assets.xcassets']
}
ss.framework = 'JavaScriptCore'
ss.dependency 'SocketRocket', '~> 0.1'
end
s.subspec "RN" do |ss|
ss.dependency "yoga"
ss.dependency 'Hummer/Core'
end
s.subspec "OSSYoga" do |ss|
ss.dependency "Yoga", "~> 1.14"
ss.dependency 'Hummer/Core'
end
s.subspec "WebP" do |ss|
ss.source_files = 'iOS/Hummer/Classes/Core/Manager/ImageLoader/Decoder/ConcreteCoder/Webp/HMWebpImageCoder.{h,m}'
ss.dependency 'libwebp', '~> 1.2.0'
end
s.subspec "Lottie" do |ss|
ss.source_files = 'iOS/Hummer/Classes/Component/Views/Lottie/**/*.{h,m}'
ss.exclude_files = 'iOS/Hummer/Classes/Component/Views/Lottie/Swift/*.{h,m,Swift}'
ss.dependency 'lottie-ios', '>=2.5.3'#指定2.5.3
ss.dependency 'Hummer/Core'
ss.dependency 'SSZipArchive'
end
s.subspec "LottieSwift" do |ss|
ss.source_files = 'iOS/Hummer/Classes/Component/Views/Lottie/Swift/*.{h,m,Swift}'
ss.dependency 'lottie-ios', '>=4.0.0'
ss.dependency 'Hummer/Lottie'
end
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'WARNING_CFLAGS' => [
'-Werror=undeclared-selector',
'-Werror=incomplete-implementation'
]
}
s.libraries = 'c++'
end