mirror of
https://github.com/material-components/material-components-ios.git
synced 2026-02-20 08:27:32 +08:00
93 lines
2.9 KiB
Ruby
93 lines
2.9 KiB
Ruby
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
|