1*94a1f676SEric Samelsonrequire 'json'
2*94a1f676SEric Samelson
3*94a1f676SEric Samelsonpackage = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4*94a1f676SEric Samelson
5*94a1f676SEric SamelsonPod::Spec.new do |s|
6*94a1f676SEric Samelson  s.name           = 'EXStructuredHeaders'
7*94a1f676SEric Samelson  s.version        = package['version']
8*94a1f676SEric Samelson  s.summary        = package['description']
9*94a1f676SEric Samelson  s.description    = package['description']
10*94a1f676SEric Samelson  s.license        = package['license']
11*94a1f676SEric Samelson  s.author         = package['author']
12*94a1f676SEric Samelson  s.homepage       = package['homepage']
13*94a1f676SEric Samelson  s.platform       = :ios, '11.0'
14*94a1f676SEric Samelson  s.source         = { git: 'https://github.com/expo/expo.git' }
15*94a1f676SEric Samelson
16*94a1f676SEric Samelson  s.dependency 'UMCore'
17*94a1f676SEric Samelson
18*94a1f676SEric Samelson  if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
19*94a1f676SEric Samelson    s.source_files = "#{s.name}/**/*.h"
20*94a1f676SEric Samelson    s.vendored_frameworks = "#{s.name}.xcframework"
21*94a1f676SEric Samelson  else
22*94a1f676SEric Samelson    s.source_files = "#{s.name}/**/*.{h,m}"
23*94a1f676SEric Samelson  end
24*94a1f676SEric Samelson
25*94a1f676SEric Samelson  s.test_spec 'Tests' do |test_spec|
26*94a1f676SEric Samelson    test_spec.source_files = 'Tests/*.{h,m}'
27*94a1f676SEric Samelson  end
28*94a1f676SEric Samelsonend
29