forked from material-components/material-components-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPodfile
92 lines (78 loc) · 2.94 KB
/
Podfile
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
workspace 'MDCCatalog.xcworkspace'
project 'MDCCatalog.xcodeproj'
target "MDCCatalog" do
platform :ios, '8.0'
project 'MDCCatalog.xcodeproj'
pod 'MaterialComponentsExamples', :path => '../'
pod 'MaterialComponents', :path => '../'
pod 'CatalogByConvention', "~> 2.3"
pod 'MaterialCatalog', :path => 'MaterialCatalog/'
use_frameworks!
end
target "MDCUnitTests" do
platform :ios, '8.0'
project 'MDCUnitTests.xcodeproj'
pod 'MaterialComponentsUnitTests', :path => '../'
pod 'MaterialComponents', :path => '../'
pod 'CatalogByConvention', "~> 2.3"
pod 'MaterialCatalog', :path => 'MaterialCatalog/'
use_frameworks!
end
target "MDCActionExtension" do
platform :ios, '8.0'
project 'MDCCatalog.xcodeproj'
pod 'MaterialComponentsExamples', :path => '../'
pod 'MaterialComponents', :path => '../'
pod 'CatalogByConvention', "~> 2.3"
pod 'MaterialCatalog', :path => 'MaterialCatalog/'
use_frameworks!
end
target "MDCDragons" do
platform :ios, '8.0'
project 'MDCDragons.xcodeproj'
pod 'CatalogByConvention', "~> 2.3"
pod 'MaterialComponents', :path => '../'
pod 'MaterialComponentsExamples', :path => '../'
use_frameworks!
end
# EarlGrey configuration
PROJECT_NAME = 'MDCCatalog'
TEST_TARGET = 'MDCEarlGreyTests'
SCHEME_FILE = 'MDCEarlGreyTests.xcscheme'
target TEST_TARGET do
platform :ios, '8.0'
project PROJECT_NAME
inherit! :search_paths
pod 'EarlGrey', '<2'
pod 'MaterialComponentsEarlGreyTests', :path => '../'
use_frameworks!
end
post_install do |installer|
pod_dir = File.dirname(installer.pods_project.path)
# Inject our specific warning flags into the .xcconfig files.
mdc_xcconfigs = [
"#{pod_dir}/Target Support Files/MaterialComponents/MaterialComponents.xcconfig",
"#{pod_dir}/Target Support Files//MaterialComponentsExamples/MaterialComponentsExamples.xcconfig",
"#{pod_dir}/Target Support Files/Pods-MDCCatalog/Pods-MDCCatalog.debug.xcconfig",
"#{pod_dir}/Target Support Files/Pods-MDCCatalog/Pods-MDCCatalog.release.xcconfig",
"#{pod_dir}/Target Support Files/Pods-MDCUnitTests/Pods-MDCUnitTests.debug.xcconfig",
"#{pod_dir}/Target Support Files/Pods-MDCUnitTests/Pods-MDCUnitTests.release.xcconfig",
]
# Note the path is relative to the xcconfig file being modified.
# https://pewpewthespells.com/blog/xcconfig_guide.html
mdc_xcconfigs.each do |mdc_xcconfig|
new_xcconfig = File.read(mdc_xcconfig)
new_xcconfig << "\n#include \"../../../MaterialComponentsWarnings.xcconfig\""
File.write(mdc_xcconfig, new_xcconfig)
end
# EarlGrey configuration
earl_grey_dir = "#{File.dirname(__FILE__)}/third_party/EarlGrey"
`git submodule update --init #{earl_grey_dir}`
if $?.exitstatus == 0
load "#{earl_grey_dir}/gem/lib/earlgrey/configure_earlgrey.rb"
configure_for_earlgrey(installer, PROJECT_NAME, TEST_TARGET, SCHEME_FILE)
else
puts "Earl Grey submodule update failed. If this project is not a git "\
"repository, then this is fine."
end
end