Class: Pod::Source::Manager
- Inherits:
-
Object
- Object
- Pod::Source::Manager
- Defined in:
- lib/cocoapods-bb-bin/native/sources_manager.rb
Instance Method Summary collapse
-
#abc_source ⇒ Object
ABC产品线源.
-
#binary_source ⇒ Object
二进制 source (区分动态库还是静态库).
-
#br_source ⇒ Object
br产品线源.
-
#bw_source ⇒ Object
bw产品线源.
-
#code_source ⇒ Object
源码 source.
-
#custom_business_source(source_spec) ⇒ Object
自定义产品线源.
-
#dylib_binary_source ⇒ Object
动态库二进制源.
- #initLibEnv(isGenDylib = false) ⇒ Object
-
#math_source ⇒ Object
思维产品线源.
-
#science_source ⇒ Object
科学产品线源.
-
#static_binary_source ⇒ Object
静态库二进制源.
-
#supportDylibSource ⇒ Object
是否支持动态库.
Instance Method Details
#abc_source ⇒ Object
ABC产品线源
55 56 57 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 55 def abc_source source_with_name_or_url(CBin.config.abc_repo_url) end |
#binary_source ⇒ Object
二进制 source (区分动态库还是静态库)
34 35 36 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 34 def binary_source return supportDylibSource ? dylib_binary_source : static_binary_source end |
#br_source ⇒ Object
br产品线源
39 40 41 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 39 def br_source source_with_name_or_url(CBin.config.br_repo_url) end |
#bw_source ⇒ Object
bw产品线源
43 44 45 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 43 def bw_source source_with_name_or_url(CBin.config.bw_repo_url) end |
#code_source ⇒ Object
源码 source
16 17 18 19 20 21 22 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 16 def code_source if supportDylibSource # 动态库 source_with_name_or_url(CBin.config.sourceV2_repo_url) else # 静态库 source_with_name_or_url(CBin.config.code_repo_url) end end |
#custom_business_source(source_spec) ⇒ Object
自定义产品线源
59 60 61 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 59 def custom_business_source(source_spec) source_with_name_or_url(source_spec) end |
#dylib_binary_source ⇒ Object
动态库二进制源
29 30 31 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 29 def dylib_binary_source source_with_name_or_url(CBin.config.dylib_repo_url) end |
#initLibEnv(isGenDylib = false) ⇒ Object
10 11 12 13 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 10 def initLibEnv(isGenDylib=false) @dylib = isGenDylib UI.puts "初始化源环境support dylib:#{isGenDylib}" end |
#math_source ⇒ Object
思维产品线源
47 48 49 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 47 def math_source source_with_name_or_url(CBin.config.math_repo_url) end |
#science_source ⇒ Object
科学产品线源
51 52 53 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 51 def science_source source_with_name_or_url(CBin.config.science_repo_url) end |
#static_binary_source ⇒ Object
静态库二进制源
25 26 27 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 25 def static_binary_source source_with_name_or_url(CBin.config.binary_repo_url) end |
#supportDylibSource ⇒ Object
是否支持动态库
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/cocoapods-bb-bin/native/sources_manager.rb', line 64 def supportDylibSource if @dylib return true else # 优先解析podfile中source动态配置是否添加动态库源 podfile = Pod::Config.instance.podfile if podfile dylib_source = CBin.config.dylib_repo_url podfile.sources.map do |source| if source === dylib_source UI.puts "切换到动态库源:#{dylib_binary_source}" return true end end end return false end end |