-
Notifications
You must be signed in to change notification settings - Fork 0
/
cresc.podspec
66 lines (53 loc) · 2.34 KB
/
cresc.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
require 'json'
new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
Pod::Spec.new do |s|
s.name = 'Cresc'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
s.authors = package['author']
s.homepage = package['homepage']
s.cocoapods_version = '>= 1.6.0'
s.platforms = { :ios => "11.0" }
s.source = { :git => 'https://github.com/cresc-dev/cresc.git', :tag => '#{s.version}' }
s.source_files = "ios/**/*.{h,m,mm,swift}"
s.libraries = 'bz2', 'z'
s.vendored_libraries = 'RCTCresc/libRCTCresc.a'
s.pod_target_xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '"$(SRCROOT)/../node_modules/@cresc/core/ios"' }
s.resource = 'ios/cresc_build_time.txt'
s.script_phase = { :name => 'Generate build time', :script => 'set -x;date +%s > ${PODS_ROOT}/../../node_modules/@cresc/core/ios/cresc_build_time.txt', :execution_position => :before_compile }
s.dependency 'React'
s.dependency "React-Core"
s.dependency 'SSZipArchive'
s.subspec 'Cresc-Core' do |ss|
ss.source_files = 'ios/RCTCresc/*.{h,m}'
ss.public_header_files = ['ios/RCTCresc/RCTCresc.h']
end
s.subspec 'HDiffPatch' do |ss|
ss.source_files = ['ios/RCTCresc/HDiffPatch/**/*.{h,m,c}',
'android/jni/hpatch.{h,c}',
'android/jni/HDiffPatch/libHDiffPatch/HPatch/*.{h,c}',
'android/jni/HDiffPatch/file_for_patch.{h,c}',
'android/jni/lzma/C/LzmaDec.{h,c}',
'android/jni/lzma/C/Lzma2Dec.{h,c}']
ss.private_header_files = 'ios/RCTCresc/HDiffPatch/**/*.h'
end
if defined?(install_modules_dependencies()) != nil
install_modules_dependencies(s);
else
if new_arch_enabled
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
}
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
end
end
end