|
| 1 | +libFolder = 'WebDriverAgentLib' |
| 2 | + |
| 3 | +public_headers = [ |
| 4 | + "#{libFolder}/Routing/FBWebServer.h", |
| 5 | + "#{libFolder}/Utilities/FBConfiguration.h", |
| 6 | + "#{libFolder}/Utilities/FBDebugLogDelegateDecorator.h", |
| 7 | + "PrivateHeaders/XCTest/XCDebugLogDelegate-Protocol.h" |
| 8 | +] |
| 9 | + |
| 10 | +project_headers = Dir.glob("#{libFolder}/**/*.h") + Dir.glob("PrivateHeaders/**/*.h") - public_headers |
| 11 | + |
| 12 | +source_files = "#{libFolder}/**/*.{h,m}", "PrivateHeaders/**/*.h" |
| 13 | + |
| 14 | +xcconfig_path = "Configurations/IOSSettings.xcconfig" |
| 15 | + |
| 16 | +Pod::Spec.new do |s| |
| 17 | + s.name = 'WebDriverAgentLib' |
| 18 | + s.version = '1.0.0' |
| 19 | + s.summary = 'A brief description of WebDriverAgent.' |
| 20 | + s.license = { :type => 'BSD', :file => "LICENSE" } |
| 21 | + s.description = <<-DESC |
| 22 | + A more detailed description of WebDriverAgent. |
| 23 | + DESC |
| 24 | + s.homepage = 'https://example.com/WebDriverAgent' |
| 25 | + s.author = { 'Author' => 'author@example.com' } |
| 26 | + s.source = { :git => 'https://github.com/appium/WebDriverAgent.git', :tag => s.version.to_s } |
| 27 | + s.platform = :ios, '12.0' |
| 28 | + s.frameworks = 'XCTest' |
| 29 | + s.public_header_files = public_headers |
| 30 | + s.project_header_files = project_headers |
| 31 | + s.source_files = source_files |
| 32 | + s.pod_target_xcconfig = File.open(File.join(Dir.pwd, xcconfig_path)) do |file| |
| 33 | + Hash[file.each_line.map { |line| line.strip.empty? ? next : line.split("=", 2) }.compact] |
| 34 | + end |
| 35 | + s.user_target_xcconfig = File.open(File.join(Dir.pwd, xcconfig_path)) do |file| |
| 36 | + Hash[file.each_line.map { |line| line.strip.empty? ? next : line.split("=", 2) }.compact] |
| 37 | + end |
| 38 | +end |
0 commit comments