-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
AsyncObjects.podspec
68 lines (57 loc) · 2.1 KB
/
AsyncObjects.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
require 'json'
Pod::Spec.new do |s|
package = JSON.parse(File.read('package.json'), {object_class: OpenStruct})
s.name = 'AsyncObjects'
s.version = package.version.to_s
s.homepage = package.homepage
s.summary = package.summary
s.description = package.description
s.license = { :type => package.license, :file => 'LICENSE' }
s.social_media_url = package.author.url
s.readme = "#{s.homepage}/blob/main/README.md"
s.changelog = "#{s.homepage}/blob/main/CHANGELOG.md"
s.documentation_url = "https://swiftylab.github.io/AsyncObjects/#{s.version}/documentation/#{s.name.downcase}/"
s.source = {
package.repository.type.to_sym => package.repository.url,
:tag => "v#{s.version}"
}
s.authors = {
package.author.name => package.author.email
}
s.swift_version = '5.6'
s.ios.deployment_target = '13.0'
s.macos.deployment_target = '10.15'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
s.osx.deployment_target = '10.15'
s.source_files = "Sources/#{s.name}/**/*.*"
s.preserve_paths = "{Sources,Tests}/#{s.name}*/**/*", "*.md"
s.pod_target_xcconfig = {
'CLANG_WARN_DOCUMENTATION_COMMENTS' => 'YES',
'RUN_DOCUMENTATION_COMPILER' => 'YES'
}
s.dependency 'OrderedCollections', '~> 1.0.0'
s.default_subspecs = :none
s.subspec 'Checked' do |ss|
ss.pod_target_xcconfig = {
'OTHER_SWIFT_FLAGS' => '-D ASYNCOBJECTS_USE_CHECKEDCONTINUATION'
}
end
s.subspec 'Logging' do |ss|
ss.dependency 'Logging', '~> 1.0.0'
# ss.default_subspec = 'Info'
for level in ['Debug', 'Info', 'Trace'] do
ss.subspec level do |sss|
sss.pod_target_xcconfig = {
'OTHER_SWIFT_FLAGS' => "-D ASYNCOBJECTS_ENABLE_LOGGING_LEVEL_#{level.upcase}"
}
end
end
end
s.test_spec do |ts|
ts.source_files = "Tests/#{s.name}Tests/**/*.swift"
ts.dependency "#{s.name}/Checked"
ts.dependency "#{s.name}/Logging"
ts.scheme = { :parallelizable => true, :code_coverage => true }
end
end