-
Notifications
You must be signed in to change notification settings - Fork 47
/
PlayerUI.podspec
141 lines (121 loc) · 4.89 KB
/
PlayerUI.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
# Be sure to run `pod lib lint PlayerUI.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 = 'PlayerUI'
s.version = '0.0.1-placeholder'
s.summary = 'A native renderer for Player content'
s.swift_versions = ['5.1']
s.description = <<-DESC
This package is used to process semantic JSON in the Player format
and display it as a SwiftUI view comprised of registered assets.
DESC
s.homepage = 'https://github.com/player-ui/player'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'hborawski' => '[email protected]' }
s.source = { :git => "https://github.com/player-ui/playerui-swift-package.git", :tag => s.version.to_s }
s.ios.deployment_target = '14.0'
s.default_subspec = 'Main'
s.subspec 'Main' do |all|
all.dependency 'PlayerUI/SwiftUI'
end
# <PACKAGES>
s.subspec 'Core' do |core|
core.source_files = 'ios/core/Sources/**/*'
core.dependency 'SwiftHooks', '~> 0', '>= 0.1.0'
core.dependency 'PlayerUI/Logger'
core.resource_bundles = {
'PlayerUI' => ['ios/core/Resources/**/*.js']
}
end
s.subspec 'SwiftUI' do |swiftui|
swiftui.dependency 'PlayerUI/Core'
swiftui.source_files = 'ios/swiftui/Sources/**/*'
end
s.subspec 'Logger' do |pkg|
pkg.dependency 'SwiftHooks', '~> 0', '>= 0.1.0'
pkg.source_files = 'ios/logger/Sources/**/*'
end
s.subspec 'ReferenceAssets' do |assets|
assets.dependency 'PlayerUI/Core'
assets.dependency 'PlayerUI/SwiftUI'
assets.dependency 'PlayerUI/BeaconPlugin'
assets.dependency 'PlayerUI/SwiftUIPendingTransactionPlugin'
assets.source_files = 'plugins/reference-assets/swiftui/Sources/**/*'
assets.resource_bundles = {
'ReferenceAssets' => [
'plugins/reference-assets/swiftui/Resources/js/**/*.js',
'plugins/reference-assets/swiftui/Resources/svg/*.xcassets',
'plugins/reference-assets/swiftui/Resources/svg/*.xcassets/**/*'
]
}
end
s.subspec 'TestUtilitiesCore' do |utils|
utils.dependency 'PlayerUI/Core'
utils.dependency 'PlayerUI/SwiftUI'
utils.source_files = 'ios/test-utils-core/Sources/**/*'
utils.resource_bundles = {
'TestUtilities' => ['ios/test-utils-core/Resources/**/*.js']
}
end
s.subspec 'TestUtilities' do |utils|
utils.dependency 'PlayerUI/Core'
utils.dependency 'PlayerUI/SwiftUI'
utils.dependency 'PlayerUI/TestUtilitiesCore'
utils.source_files = 'ios/test-utils/Sources/**/*'
utils.weak_framework = 'XCTest'
utils.pod_target_xcconfig = {
'ENABLE_BITCODE' => 'NO',
'ENABLE_TESTING_SEARCH_PATHS' => 'YES'
}
end
# </PACKAGES>
ios_plugin = lambda { |name, path, resources|
s.subspec name do |subspec|
subspec.dependency 'PlayerUI/Core'
subspec.source_files = "plugins/#{path}/ios/Sources/**/*"
if resources == TRUE
subspec.resource_bundles = {
"PlayerUI_#{name}" => ["plugins/#{path}/ios/Resources/**/*.js"]
}
end
end
}
swiftui_plugin = lambda { |name, path, deps, resources|
s.subspec name do |subspec|
subspec.dependency 'PlayerUI/Core'
subspec.dependency 'PlayerUI/SwiftUI'
deps.each { |dep|
subspec.dependency "PlayerUI/#{dep}"
}
subspec.source_files = "plugins/#{path}/swiftui/Sources/**/*"
if resources == TRUE
subspec.resource_bundles = {
"PlayerUI_#{name}" => ["plugins/#{path}/swiftui/Resources/**/*.js"]
}
end
end
}
# <PLUGINS>
ios_plugin.call("BaseBeaconPlugin", "beacon", TRUE)
ios_plugin.call("CheckPathPlugin", "check-path", TRUE)
ios_plugin.call("CommonExpressionsPlugin", "common-expressions", TRUE)
ios_plugin.call("CommonTypesPlugin", "common-types", TRUE)
ios_plugin.call("ComputedPropertiesPlugin", "computed-properties", TRUE)
ios_plugin.call("ExpressionPlugin", "expression", TRUE)
ios_plugin.call("ExternalActionPlugin", "external-action", TRUE)
ios_plugin.call("PubSubPlugin", "pubsub", TRUE)
ios_plugin.call("StageRevertDataPlugin", "stage-revert-data", TRUE)
ios_plugin.call("TypesProviderPlugin", "types-provider", TRUE)
ios_plugin.call("PrintLoggerPlugin", "console-logger", FALSE)
swiftui_plugin.call("BeaconPlugin", "beacon", ["BaseBeaconPlugin"], FALSE)
swiftui_plugin.call("MetricsPlugin", "metrics", [], TRUE)
swiftui_plugin.call("SwiftUICheckPathPlugin", "check-path", ["CheckPathPlugin"], FALSE)
swiftui_plugin.call("ExternalActionViewModifierPlugin", "external-action", ["ExternalActionPlugin"], FALSE)
swiftui_plugin.call("SwiftUIPendingTransactionPlugin", "pending-transaction", [], FALSE)
swiftui_plugin.call("TransitionPlugin", "transition", [], FALSE)
# </PLUGINS>
end