cocoapods-jxedt 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97f69690fe092a3b3f3ac75812d982e144d4f5e8434e70d999ab81a6d0aeef89
4
- data.tar.gz: 55319b9dd689f80433855208a24a81b4b85a6b1a898b88b9921b961ef6bae4a0
3
+ metadata.gz: 87b8390f2490128b3ae787cd3a5d1ae8677eda84a3d8b2817f9d89fef6b47e1d
4
+ data.tar.gz: b43bef366375925d915be7bf0a4e4b745a1f2eaf506ea0991f6cd7292bce849c
5
5
  SHA512:
6
- metadata.gz: ecbb12c9bb4c7adac71673b5a47d02a80695112d0acfc157585448c761a91e8ee679d091500cbbcecabea583cfa92a76b1ac74738fc07bf3f8a70494f853c2be
7
- data.tar.gz: 03cb1d511a955cbbe0b6925e1c03a1bc840f09095b91000c5ee581c692d4415adad79fd1b67213c6e712942afcd4d296285ecb9cc8667fdaa51f5a865dadf6d6
6
+ metadata.gz: 7a771222219d027b4f5b5de8077c63d6d9e04450b39c8383e940a1c3b1bf2bdccdd0c974d024ba4a9e8b30da82a530c4370d79c4f14067f1384a9d0fea8d6c4c
7
+ data.tar.gz: 2a7f8424df70d69f239aa28996152857504e6e07253521fefab8b9370c15a03c98b0effa5637a08ac82a004e75622708a7b3c1d99a2b1af4baa0cd22d0792772
@@ -140,6 +140,12 @@ module Pod
140
140
  # rmtree
141
141
  target_prebuild_files = self.sandbox.pod_dir(spec.name) + "_Prebuild"
142
142
  target_prebuild_files.rmtree if target_prebuild_files.exist?
143
+
144
+ # 切换到local pod时,清除一下pod所在目录下的_Prebuild文件夹
145
+ if self.sandbox.local?(spec.root.name)
146
+ source_target_prebuild_files = self.sandbox.sources_root + spec.root.name + "_Prebuild"
147
+ source_target_prebuild_files.rmtree if source_target_prebuild_files.exist?
148
+ end
143
149
 
144
150
  self.prebuild_pod_names.include? spec.root.name
145
151
  end)
@@ -63,6 +63,13 @@ module Jxedt
63
63
  @dsl_config[:all_binary] || false
64
64
  end
65
65
 
66
+ def binary_settings
67
+ @options ||= begin
68
+ @dsl_config[:use_binary_settings] || {}
69
+ end
70
+ @options
71
+ end
72
+
66
73
  def binary_switch?
67
74
  @dsl_config[:binary_switch] || @dsl_config[:binary_switch].nil?
68
75
  end
@@ -109,7 +109,23 @@ module Pod
109
109
  end
110
110
 
111
111
  def clean_source_project!
112
- return if Jxedt.config.keep_source_project?
112
+ if Jxedt.config.keep_source_project?
113
+ # 修改productName后,可以把源码工程拖入workspace中源码调试,而源码不链接和编译
114
+ require 'xcodeproj'
115
+ project = Xcodeproj::Project.open(project_path)
116
+ project.targets.each do |target|
117
+ target.build_configurations.each do |config|
118
+ # 修改工程的product name
119
+ product_name = config.build_settings['PRODUCT_NAME'] || target.name
120
+ config.build_settings['PRODUCT_NAME'] = "#{product_name}_Source"
121
+ end
122
+ # target.name = "#{target.name}_Source"
123
+ end
124
+ project.save
125
+
126
+ # 保存源码工程,退出
127
+ return
128
+ end
113
129
 
114
130
  sources_root.rmtree if real_path_compiler? && sources_root.exist?
115
131
  root.rmtree if root.exist?
@@ -7,8 +7,18 @@ module Pod
7
7
  # prebuild
8
8
  @explicit_prebuild_pod_names ||= []
9
9
  @reject_prebuild_pod_names ||= []
10
- @explicit_prebuild_pod_names << Specification.root_name(name) if options.is_a?(Hash) && options[:binary]
11
- @reject_prebuild_pod_names << Specification.root_name(name) if options.is_a?(Hash) && options.include?(:binary) && !options[:binary]
10
+ if options.is_a?(Hash) && options.include?(:binary)
11
+ @explicit_prebuild_pod_names << Specification.root_name(name) if options[:binary]
12
+ @reject_prebuild_pod_names << Specification.root_name(name) unless options[:binary]
13
+ else
14
+ settings = Jxedt.config.binary_settings
15
+ symbol_name = Specification.root_name(name).to_sym
16
+ if settings.include?(symbol_name) && [true, false].include?(settings[symbol_name])
17
+ @explicit_prebuild_pod_names << Specification.root_name(name) if settings[symbol_name]
18
+ @reject_prebuild_pod_names << Specification.root_name(name) unless settings[symbol_name]
19
+ end
20
+ end
21
+
12
22
 
13
23
  # header search path
14
24
  @explicit_header_search_pod_names ||= []
@@ -17,6 +17,13 @@ module Pod
17
17
  Jxedt.config.dsl_config.merge!({'framework_header_search_enabled': true})
18
18
  end
19
19
 
20
+ # 统一设置是否使用binary
21
+ def use_binary_settings(options=nil)
22
+ return if options.nil?
23
+ return unless options.is_a?(Hash)
24
+ Jxedt.config.dsl_config.merge!({'use_binary_settings': options})
25
+ end
26
+
20
27
  def cocoapods_jxedt_config(options)
21
28
  Jxedt.config.dsl_config.merge!(options)
22
29
  Jxedt.config.validate_dsl_config
@@ -37,7 +37,11 @@ module Pod
37
37
 
38
38
  used_binary = []
39
39
  Dir.glob("#{pods_root}/*/_Prebuild") do |file_path|
40
+ # 不是目录,不处理
40
41
  next unless File.directory?(file_path)
42
+ # 目录下文件为空不处理
43
+ next if Dir["#{file_path}/*"].empty?
44
+
41
45
  dir_name = File.dirname(file_path)
42
46
  name = File.basename(dir_name).to_s
43
47
  target_path = binary_dir + name
@@ -64,6 +68,9 @@ module Pod
64
68
  index, failed = 0, []
65
69
  used_binary.sort_by {|hash| hash[:name].capitalize }.each do |hash|
66
70
  name = hash[:name]
71
+
72
+ # lockfile中没有则跳过
73
+ next unless lockfile.internal_data["SPEC CHECKSUMS"].include?(name)
67
74
 
68
75
  checksum = lockfile.spec_checksums_hash_key(name)
69
76
  validation_passed = checksum && checksum == hash[:checksum] && hash[:checksum_count] == 1
@@ -1,3 +1,3 @@
1
1
  module CocoapodsJxedt
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-jxedt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - guojiashuang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-04 00:00:00.000000000 Z
11
+ date: 2023-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods