forked from material-components/material-components-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MaterialComponentsBeta.podspec
106 lines (91 loc) · 5.94 KB
/
MaterialComponentsBeta.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
Pod::Spec.new do |mdc|
mdc.name = "MaterialComponentsBeta"
mdc.version = "97.0.1"
mdc.authors = "The Material Components authors."
mdc.summary = "A collection of stand-alone alpha UI libraries that are not yet guaranteed to be ready for general production use. Use with caution."
mdc.homepage = "https://github.com/material-components/material-components-ios"
mdc.license = "Apache 2.0"
mdc.source = { :git => "https://github.com/material-components/material-components-ios.git", :tag => "v#{mdc.version}" }
mdc.platform = :ios
mdc.requires_arc = true
mdc.ios.deployment_target = '9.0'
# See MaterialComponents.podspec for the subspec structure and template.
# ActionSheet
mdc.subspec "ActionSheet+ActionSheetThemer" do |extension|
extension.ios.deployment_target = '9.0'
extension.public_header_files = "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
extension.source_files = "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}", "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/private/*.{h,m}"
extension.dependency "MaterialComponents/#{extension.base_name.split('+')[0]}"
extension.dependency "MaterialComponentsBeta/ActionSheet+ColorThemer"
extension.dependency "MaterialComponentsBeta/ActionSheet+TypographyThemer"
extension.test_spec 'UnitTests' do |unit_tests|
unit_tests.source_files = [
"components/#{extension.base_name.split('+')[0]}/tests/unit/#{extension.base_name.split('+')[1]}/*.{h,m,swift}",
"components/#{extension.base_name.split('+')[0]}/tests/unit/#{extension.base_name.split('+')[1]}/supplemental/*.{h,m,swift}", "components/#{extension.base_name.split('+')[0]}/tests/unit/MDCActionSheetTestHelper.*"
]
unit_tests.resources = "components/#{extension.base_name.split('+')[0]}/tests/unit/#{extension.base_name.split('+')[1]}/resources/*"
end
end
mdc.subspec "ActionSheet+ColorThemer" do |extension|
extension.ios.deployment_target = '9.0'
extension.public_header_files = "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
extension.source_files = "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}", "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/private/*.{h,m}"
extension.dependency "MaterialComponents/#{extension.base_name.split('+')[0]}"
extension.dependency "MaterialComponents/schemes/Color"
extension.test_spec 'UnitTests' do |unit_tests|
unit_tests.source_files = [
"components/#{extension.base_name.split('+')[0]}/tests/unit/#{extension.base_name.split('+')[1]}/*.{h,m,swift}",
"components/#{extension.base_name.split('+')[0]}/tests/unit/#{extension.base_name.split('+')[1]}/supplemental/*.{h,m,swift}"
]
unit_tests.resources = "components/#{extension.base_name.split('+')[0]}/tests/unit/#{extension.base_name.split('+')[1]}/resources/*"
end
end
mdc.subspec "ActionSheet+TypographyThemer" do |extension|
extension.ios.deployment_target = '9.0'
extension.public_header_files = "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
extension.source_files = "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}", "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/private/*.{h,m}"
extension.dependency "MaterialComponents/#{extension.base_name.split('+')[0]}"
extension.dependency "MaterialComponents/schemes/Typography"
end
mdc.subspec "BottomNavigation" do |component|
component.ios.deployment_target = '9.0'
component.public_header_files = "components/#{component.base_name}/src/MDCBottomNavigationBarController.h", "components/#{component.base_name}/src/MaterialBottomNavigationBeta.h"
component.source_files = "components/#{component.base_name}/src/MDCBottomNavigationBarController.*", "components/#{component.base_name}/src/MaterialBottomNavigationBeta.h"
component.dependency "MaterialComponents/BottomNavigation"
component.test_spec 'UnitTests' do |unit_tests|
unit_tests.source_files = [
"components/#{component.base_name}/tests/unit/MDCBottomNavigationBarControllerTests.m"
]
end
end
mdc.subspec "Tabs+TabBarView" do |extension|
extension.ios.deployment_target = '9.0'
extension.public_header_files = "components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
extension.source_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}",
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/private/*.{h,m}"
]
extension.dependency "MaterialComponents/AnimationTiming"
extension.dependency "MaterialComponents/Ripple"
extension.dependency "MaterialComponents/private/Math"
extension.dependency "MDFInternationalization"
extension.test_spec 'UnitTests' do |unit_tests|
unit_tests.source_files = [
"components/#{extension.base_name.split('+')[0]}/tests/unit/#{extension.base_name.split('+')[1]}/*.{h,m,swift}",
]
unit_tests.dependency "MaterialComponents/AppBar"
unit_tests.dependency "MaterialComponents/HeaderStackView"
unit_tests.dependency "MaterialComponents/Typography"
end
end
# Private
mdc.subspec "private" do |private_spec|
# CocoaPods requires at least one file to show up in a subspec, so we depend on the fake
# "Beta" component as a baseline.
private_spec.subspec "Beta" do |component|
component.ios.deployment_target = '9.0'
component.public_header_files = "components/private/#{component.base_name}/src/*.h"
component.source_files = "components/private/#{component.base_name}/src/*.{h,m}"
end
end
end