-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHBSwiftKit.podspec
137 lines (113 loc) · 6.17 KB
/
HBSwiftKit.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
#
# Be sure to run `pod lib lint HBSwiftKit.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
#
# SwifterSwift: over 500 native Swift extensions https://github.com/SwifterSwift/SwifterSwift
#➜ HBSwiftKitExample (main) ✗ xcodebuild clean
#➜ HBSwiftKitExample (main) ✗ pod cache clean --all
#➜ HBSwiftKitExample (main) ✗ pod spec lint HBSwiftKit.podspec --allow-warnings --verbose
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = 'HBSwiftKit'
s.version = '0.5.1'
s.summary = 'some common components.'
s.description = <<-DESC
仅仅一些个人常用组件.学习工作使用.
DESC
s.homepage = 'https://github.com/hubin97/HBSwiftKitExample'
s.swift_versions = ['5.0']
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.license = { :type => 'MIT', :file => 'LICENSE' }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.author = { 'Hubin_Huang' => '[email protected]' }
s.social_media_url = 'https://hubin97.github.io'
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.ios.deployment_target = '13.0'
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.source = { :git => 'https://github.com/hubin97/HBSwiftKitExample.git', :tag => s.version.to_s }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
# 子模块:Base
s.subspec 'Base' do |base|
# 使用 Ruby 数组简化多个依赖的定义
# 扩展自定义Hud; pod 'ProgressHUD', :git => 'https://github.com/hubin97/ProgressHUD.git'
['SnapKit', 'Kingfisher', 'Toast-Swift', 'ProgressHUD'].each do |dd|
base.dependency dd
end
#base.dependency 'Hero', '~> 1.6.3' # 确保使用支持 iOS 13 的版本
base.subspec 'Extension' do |ss|
ss.source_files = 'HBSwiftKit/Base/Extension/*.swift'
end
base.subspec 'Core' do |ss|
ss.framework = "Foundation", "UIKit"
ss.source_files = 'HBSwiftKit/Base/Core/**/*.swift'
ss.dependency 'HBSwiftKit/Base/Extension'
end
end
# 子模块:HTTP
s.subspec 'HTTP' do |http|
['RxSwift', 'RxRelay', 'Moya', 'ObjectMapper', 'PromiseKit', 'ProgressHUD'].each do |dd|
http.dependency dd
end
http.subspec 'Core' do |ss|
ss.source_files = 'HBSwiftKit/HTTP/Core/*.{swift,h,m,md}'
end
http.subspec 'Utils' do |ss|
ss.source_files = 'HBSwiftKit/HTTP/Utils/*.swift'
ss.framework = "Foundation", "CoreTelephony"
end
end
# 子模块:BLE
s.subspec 'BLE' do |ble|
['RxSwift', 'RxCocoa', 'NSObject+Rx'].each do |dd|
ble.dependency dd
end
ble.source_files = 'HBSwiftKit/BLE/**/*.{swift,h,m,md}'
end
# 子模块:Other
s.subspec 'Other' do |other|
['Toast-Swift', 'Kingfisher', 'CocoaLumberjack'].each do |dd|
other.dependency dd
end
other.subspec 'AuthStatus' do |auth|
auth.source_files = 'HBSwiftKit/Other/AuthStatus'
auth.dependency 'HBSwiftKit/Base/Core'
end
other.subspec 'Utils' do |utils|
utils.source_files = 'HBSwiftKit/Other/Utils'
utils.dependency 'Toast-Swift'
utils.dependency 'Kingfisher'
utils.dependency 'HBSwiftKit/Base/Core'
end
other.subspec 'LoggerManager' do |log|
log.source_files = 'HBSwiftKit/Other/LoggerManager'
log.dependency 'RxSwift'
log.dependency 'CocoaLumberjack'
log.dependency 'HBSwiftKit/Base/Core'
log.dependency 'HBSwiftKit/Base/Extension'
log.dependency 'HBSwiftKit/Other/Utils'
end
end
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.resource = 'HBSwiftKit/HBSwiftKit.bundle'
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.requires_arc = true
# xcframework 生成配置
# 开启之后才会生成 arm64-apple-ios.swiftinterface 等5个文件
# s.static_framework = true
#
# # CocoaPods Target 的编译设置
# s.pod_target_xcconfig = {
# 'DEFINES_MODULE' => 'YES', # 开启模块化支持
# 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' # 支持 Swift 模块的分发和跨版本兼容
# }
#
# # 全局编译设置
# s.xcconfig = {
# 'SKIP_INSTALL' => 'NO', # 确保不会跳过安装步骤
# 'INSTALL_PATH' => '$(LOCAL_LIBRARY_DIR)/Frameworks' # 指定 Framework 的安装路径
# }
end