forked from artsy/emission
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Emission.podspec
72 lines (62 loc) · 2.81 KB
/
Emission.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
require 'json'
root = ENV["EMISSION_ROOT"] || __dir__
pkg_version = lambda do |dir_from_root = '', version = 'version'|
path = File.join(root, dir_from_root, 'package.json')
JSON.load(File.read(path))[version]
end
emission_version = pkg_version.call
emission_native_version = pkg_version.call('', 'native-code-version')
react_native_version = pkg_version.call('node_modules/react-native')
podspec = Pod::Spec.new do |s|
s.name = 'Emission'
s.version = emission_version
s.summary = 'React Native Components used by Eigen.'
s.homepage = 'https://github.com/artsy/emission'
s.license = 'MIT'
s.author = { 'Eloy Durán' => '[email protected]',
'Maxim Cramer' => '[email protected]',
'Sarah Scott' => '[email protected]' }
s.source = { :git => 'https://github.com/artsy/emission.git', :tag => "v#{s.version}" }
s.platform = :ios, '8.0'
s.source_files = 'Pod/Classes/**/*.{h,m}'
s.preserve_paths = 'Pod/Classes/**/*.generated.objc'
s.resources = 'Pod/Assets/{Emission.js,assets}'
# Artsy UI dependencies
s.dependency 'Artsy+UIColors'
s.dependency 'Artsy+UIFonts', '>= 3.0.0'
s.dependency 'Extraction', '>= 1.2.1'
# To ensure a consistent image cache between app/lib
s.dependency 'SDWebImage', '>= 3.7.2', '< 4'
# React, and the subspecs we have to use
s.dependency 'React/Core', react_native_version
s.dependency 'React/CxxBridge', react_native_version
s.dependency 'React/RCTAnimation', react_native_version
s.dependency 'React/RCTCameraRoll', react_native_version
s.dependency 'React/RCTImage', react_native_version
s.dependency 'React/RCTLinkingIOS', react_native_version
s.dependency 'React/RCTNetwork', react_native_version
s.dependency 'React/RCTText', react_native_version
# React's Dependencies
s.dependency 'yoga', "#{react_native_version}.React"
react_podspecs = [
'node_modules/react-native/third-party-podspecs/DoubleConversion.podspec',
'node_modules/react-native/third-party-podspecs/Folly.podspec',
'node_modules/react-native/third-party-podspecs/glog.podspec',
]
# Native dependencies of Emission, which come from node_modules
dep_podspecs = [
'node_modules/tipsi-stripe/tipsi-stripe.podspec',
'node_modules/@mapbox/react-native-mapbox-gl/react-native-mapbox-gl.podspec',
'node_modules/react-native-sentry/SentryReactNative.podspec'
]
# Ties the exact versions so host apps don't need to guess the version
# or have a potential mismatch
podspecs = react_podspecs + dep_podspecs
podspecs.each do |podspec_path|
spec = Pod::Specification.from_file podspec_path
s.dependency spec.name, "#{spec.version}"
end
end
# Attach the native version info into the podspec
podspec.attributes_hash['native_version'] = emission_native_version
podspec