1require 'json'
2
3package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4
5Pod::Spec.new do |s|
6  s.name           = 'EXJSONUtils'
7  s.version        = package['version']
8  s.summary        = package['description']
9  s.description    = package['description']
10  s.license        = package['license']
11  s.author         = package['author']
12  s.homepage       = package['homepage']
13  s.platforms      = { :ios => '13.0', :tvos => '13.0' }
14  s.source         = { git: 'https://github.com/expo/expo.git' }
15  s.static_framework = true
16
17  s.pod_target_xcconfig = {
18    'GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS' => 'YES',
19    'GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS' => 'YES',
20    'DEFINES_MODULE' => 'YES',
21    'SWIFT_COMPILATION_MODE' => 'wholemodule'
22  }
23
24  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')
25    s.source_files = "#{s.name}/**/*.h"
26    s.vendored_frameworks = "#{s.name}.xcframework"
27  else
28    s.source_files = "#{s.name}/**/*.{h,m,swift}"
29  end
30
31  s.test_spec 'Tests' do |test_spec|
32    test_spec.source_files = 'Tests/*.{h,m,swift}'
33  end
34end
35