2019-05-15 23:25:03 +03:00
|
|
|
# frozen_string_literal: true
|
2017-04-21 13:30:37 +02:00
|
|
|
|
2019-05-15 23:25:03 +03:00
|
|
|
require 'json'
|
|
|
|
|
|
|
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
2017-04-21 13:30:37 +02:00
|
|
|
|
|
|
|
Pod::Spec.new do |s|
|
2019-05-15 23:25:03 +03:00
|
|
|
s.name = 'react-native-config'
|
|
|
|
s.version = package['version']
|
|
|
|
s.summary = 'Expose config variables to React Native apps'
|
|
|
|
s.author = 'Pedro Belo'
|
2017-04-21 13:30:37 +02:00
|
|
|
|
2019-05-15 23:25:03 +03:00
|
|
|
s.homepage = 'https://github.com/luggit/react-native-config'
|
2017-04-21 13:30:37 +02:00
|
|
|
|
2019-05-15 23:25:03 +03:00
|
|
|
s.license = 'MIT'
|
2020-05-19 11:13:35 -07:00
|
|
|
s.ios.deployment_target = '9.0'
|
2019-05-15 23:25:03 +03:00
|
|
|
s.tvos.deployment_target = '9.0'
|
2017-04-21 13:30:37 +02:00
|
|
|
|
2019-09-03 10:08:18 +07:00
|
|
|
s.source = { git: 'https://github.com/luggit/react-native-config.git', tag: "v#{s.version.to_s}" }
|
2019-05-15 23:25:03 +03:00
|
|
|
s.script_phase = {
|
|
|
|
name: 'Config codegen',
|
|
|
|
script: %(
|
|
|
|
set -ex
|
|
|
|
HOST_PATH="$SRCROOT/../.."
|
|
|
|
"${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig/BuildDotenvConfig.rb" "$HOST_PATH" "${PODS_TARGET_SRCROOT}/ios/ReactNativeConfig"
|
|
|
|
),
|
|
|
|
execution_position: :before_compile,
|
2020-05-19 11:37:10 -06:00
|
|
|
input_files: ['$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/BuildDotenvConfig.rb'],
|
|
|
|
output_files: ['$PODS_TARGET_SRCROOT/ios/ReactNativeConfig/GeneratedDotEnv.m']
|
2019-05-15 23:25:03 +03:00
|
|
|
}
|
2017-04-21 13:30:37 +02:00
|
|
|
|
2019-05-15 23:25:03 +03:00
|
|
|
s.source_files = 'ios/**/*.{h,m}'
|
2017-04-26 14:52:50 -07:00
|
|
|
s.requires_arc = true
|
2017-04-21 13:30:37 +02:00
|
|
|
|
2019-05-15 23:25:03 +03:00
|
|
|
s.dependency 'React'
|
2017-04-21 13:30:37 +02:00
|
|
|
end
|