forked from iAmMccc/SmartCodable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSmartCodable.podspec
More file actions
69 lines (54 loc) · 2.35 KB
/
SmartCodable.podspec
File metadata and controls
69 lines (54 loc) · 2.35 KB
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
#
# Be sure to run `pod lib lint SmartCodable.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 trunk register 邮箱名 'iAmMccc' --verbose
## pod me
## pod trunk push SmartCodable.podspec --allow-warnings
Pod::Spec.new do |s|
s.name = 'SmartCodable'
s.version = '6.0.0'
s.summary = 'Swift数据解析库'
s.homepage = 'https://github.com/iAmMccc/SmartCodable'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Mccc' => 'https://github.com/iAmMccc' }
s.source = { :git => 'https://github.com/iAmMccc/SmartCodable.git', :tag => s.version.to_s }
s.swift_version = '5.0'
s.ios.deployment_target = '13.0'
s.osx.deployment_target = '10.15'
s.tvos.deployment_target = "15.0"
s.watchos.deployment_target = '6.0'
s.visionos.deployment_target = "1.0"
s.default_subspecs = ['Core']
s.subspec 'Core' do |ss|
ss.source_files = 'Sources/SmartCodable/Core/**/*{.swift}'
end
s.subspec 'Inherit' do |ss|
ss.ios.deployment_target = '13.0'
ss.dependency 'SmartCodable/Core'
ss.source_files = 'Sources/SmartCodable/MacroSupport/*{.swift}'
# 这些配置项与宏相关,只放在 MacroSupport subspec 中
ss.preserve_paths = ["Package.swift", "Sources/SmartCodableMacros", "Tests", "Bin"]
ss.pod_target_xcconfig = {
"OTHER_SWIFT_FLAGS" => "-Xfrontend -load-plugin-executable -Xfrontend $(PODS_BUILD_DIR)/SmartCodable/release/SmartCodableMacros-tool#SmartCodableMacros",
"SUPPORTS_MACCATALYST" => "YES"
}
ss.user_target_xcconfig = {
"OTHER_SWIFT_FLAGS" => "-Xfrontend -load-plugin-executable -Xfrontend $(PODS_BUILD_DIR)/SmartCodable/release/SmartCodableMacros-tool#SmartCodableMacros"
}
script = <<-SCRIPT
env -i PATH="$PATH" "$SHELL" -l -c "swift build -c release --package-path \\"$PODS_TARGET_SRCROOT\\" --build-path \\"${PODS_BUILD_DIR}/SmartCodable\\""
SCRIPT
ss.script_phase = {
:name => 'Build SmartCodable macro plugin',
:script => script,
:execution_position => :before_compile,
:output_files => [
"${PODS_BUILD_DIR}/SmartCodable/release/SmartCodableMacros-tool"
]
}
end
end