cocoapods-xcremotecache 0.0.10 → 0.0.13

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: 1fc87268b74a697a6b70fb9ec6b33d4c39791b859853ed7b259bd8b1a7863da3
4
- data.tar.gz: 178209c802e125dc34ae391aae672b4ff23b704cc3ac024817ce3fcefb6b33de
3
+ metadata.gz: 8929b95b00fd3885898cf18700dddc98fc22b6918f806dae77dd999848a26a35
4
+ data.tar.gz: f1e5cdb7db24fbc0c3b29e048424643621dc7c5fea985d0a29d26689e4441deb
5
5
  SHA512:
6
- metadata.gz: 57f5a7b4136879cee987bfce46a920b0ea25296e8684d931fae2702f5e37c5d0f00ae81155c271008eaa58e14dad1bdb03316ed3945697e3a2388aafeb79b8bc
7
- data.tar.gz: 6da51ede43ab92f20fb85b108135549e4e1e98d0934f0c3993a9c8f3f653fb337a5569e9b7435815cf49917e2b05ad64ebdef6352d2713cc882d8344d906c046
6
+ metadata.gz: d79a51a5c7c21a472caa1311e7208b25322b13a9190cbc29f06d302f1e8d445073d1d985ed5d6626b78de93f28ac08ffb2866195fcd80dc1fecdad4817a971a5
7
+ data.tar.gz: bfd2ef88c899f0e6be31ea12109aaffcc09e30582fee638d2b1a206d2e7460fe0249d5695223abcc9220a4425363ebd4deb49102f5df0b9e4daed32e594796cf
data/README.md CHANGED
@@ -63,7 +63,3 @@ To fully uninstall the plugin, call:
63
63
  ```bash
64
64
  gem uninstall cocoapods-xcremotecache
65
65
  ```
66
-
67
- ## Limitations
68
-
69
- * When `generate_multiple_pod_projects` mode is enabled, only first-party targets are cached by XCRemoteCache (all dependencies are compiled locally).
@@ -27,8 +27,9 @@ module CocoapodsXCRemoteCacheModifier
27
27
  LLDB_INIT_COMMENT="#RemoteCacheCustomSourceMap"
28
28
  LLDB_INIT_PATH = "#{ENV['HOME']}/.lldbinit"
29
29
  FAT_ARCHIVE_NAME_INFIX = 'arm64-x86_64'
30
+ XCRC_COOCAPODS_ROOT_KEY = 'XCRC_COOCAPODS_ROOT'
30
31
 
31
- # List of plugins' user properties that should be copied to .rcinfo
32
+ # List of plugins' user properties that should not be copied to .rcinfo
32
33
  CUSTOM_CONFIGURATION_KEYS = [
33
34
  'enabled',
34
35
  'xcrc_location',
@@ -38,9 +39,7 @@ module CocoapodsXCRemoteCacheModifier
38
39
  'check_build_configuration',
39
40
  'check_platform',
40
41
  'modify_lldb_init',
41
- 'prettify_meta_files',
42
42
  'fake_src_root',
43
- 'disable_certificate_verification'
44
43
  ]
45
44
 
46
45
  class XCRemoteCache
@@ -64,9 +63,14 @@ module CocoapodsXCRemoteCacheModifier
64
63
  'exclude_targets' => [],
65
64
  'prettify_meta_files' => false,
66
65
  'fake_src_root' => "/#{'x' * 10 }",
67
- 'disable_certificate_verification' => false
66
+ 'disable_certificate_verification' => false,
67
+ 'custom_rewrite_envs' => []
68
68
  }
69
69
  @@configuration.merge! default_values.select { |k, v| !@@configuration.key?(k) }
70
+ # Always include XCRC_COOCAPODS_ROOT_KEY in custom_rewrite_envs
71
+ unless @@configuration['custom_rewrite_envs'].include?(XCRC_COOCAPODS_ROOT_KEY)
72
+ @@configuration['custom_rewrite_envs'] << XCRC_COOCAPODS_ROOT_KEY
73
+ end
70
74
  end
71
75
 
72
76
  def self.validate_configuration()
@@ -109,6 +113,8 @@ module CocoapodsXCRemoteCacheModifier
109
113
  # @param final_target [String] name of target that should trigger marking
110
114
  def self.enable_xcremotecache(target, repo_distance, xc_location, xc_cc_path, mode, exclude_build_configurations, final_target, fake_src_root)
111
115
  srcroot_relative_xc_location = parent_dir(xc_location, repo_distance)
116
+ # location of the entrite CocoaPods project, relative to SRCROOT
117
+ srcroot_relative_project_location = parent_dir('', repo_distance)
112
118
 
113
119
  target.build_configurations.each do |config|
114
120
  # apply only for relevant Configurations
@@ -121,9 +127,12 @@ module CocoapodsXCRemoteCacheModifier
121
127
  config.build_settings['SWIFT_EXEC'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xcswiftc"]
122
128
  config.build_settings['LIBTOOL'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xclibtool"]
123
129
  config.build_settings['LD'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xcld"]
130
+ config.build_settings['LDPLUSPLUS'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xcldplusplus"]
131
+ config.build_settings['SWIFT_USE_INTEGRATED_DRIVER'] = ['NO']
124
132
 
125
133
  config.build_settings['XCREMOTE_CACHE_FAKE_SRCROOT'] = fake_src_root
126
134
  config.build_settings['XCRC_PLATFORM_PREFERRED_ARCH'] = ["$(LINK_FILE_LIST_$(CURRENT_VARIANT)_$(PLATFORM_PREFERRED_ARCH):dir:standardizepath:file:default=arm64)"]
135
+ config.build_settings[XCRC_COOCAPODS_ROOT_KEY] = ["$SRCROOT/#{srcroot_relative_project_location}"]
127
136
  debug_prefix_map_replacement = '$(SRCROOT' + ':dir:standardizepath' * repo_distance + ')'
128
137
  add_cflags!(config.build_settings, '-fdebug-prefix-map', "#{debug_prefix_map_replacement}=$(XCREMOTE_CACHE_FAKE_SRCROOT)")
129
138
  add_swiftflags!(config.build_settings, '-debug-prefix-map', "#{debug_prefix_map_replacement}=$(XCREMOTE_CACHE_FAKE_SRCROOT)")
@@ -174,6 +183,11 @@ module CocoapodsXCRemoteCacheModifier
174
183
  "$(TARGET_BUILD_DIR)/$(MODULES_FOLDER_PATH)/$(PRODUCT_MODULE_NAME).swiftmodule/$(XCRC_PLATFORM_PREFERRED_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(SWIFT_PLATFORM_TARGET_PREFIX)$(LLVM_TARGET_TRIPLE_SUFFIX).swiftmodule.md5"
175
184
  ]
176
185
  postbuild_script.dependency_file = "$(TARGET_TEMP_DIR)/postbuild.d"
186
+ # Move postbuild (last element) to the position after compile sources phase (to make it real 'postbuild')
187
+ if !existing_postbuild_script
188
+ compile_phase_index = target.build_phases.index(target.source_build_phase)
189
+ target.build_phases.insert(compile_phase_index + 1, target.build_phases.delete(postbuild_script))
190
+ end
177
191
 
178
192
  # Mark a sha as ready for a given platform and configuration when building the final_target
179
193
  if (mode == 'producer' || mode == 'producer-fast') && target.name == final_target
@@ -201,9 +215,12 @@ module CocoapodsXCRemoteCacheModifier
201
215
  config.build_settings.delete('SWIFT_EXEC') if config.build_settings.key?('SWIFT_EXEC')
202
216
  config.build_settings.delete('LIBTOOL') if config.build_settings.key?('LIBTOOL')
203
217
  config.build_settings.delete('LD') if config.build_settings.key?('LD')
218
+ config.build_settings.delete('LDPLUSPLUS') if config.build_settings.key?('LDPLUSPLUS')
219
+ config.build_settings.delete('SWIFT_USE_INTEGRATED_DRIVER') if config.build_settings.key?('SWIFT_USE_INTEGRATED_DRIVER')
204
220
  # Remove Fake src root for ObjC & Swift
205
221
  config.build_settings.delete('XCREMOTE_CACHE_FAKE_SRCROOT')
206
222
  config.build_settings.delete('XCRC_PLATFORM_PREFERRED_ARCH')
223
+ config.build_settings.delete(XCRC_COOCAPODS_ROOT_KEY)
207
224
  remove_cflags!(config.build_settings, '-fdebug-prefix-map')
208
225
  remove_swiftflags!(config.build_settings, '-debug-prefix-map')
209
226
  end
@@ -223,7 +240,7 @@ module CocoapodsXCRemoteCacheModifier
223
240
  end
224
241
 
225
242
  def self.download_xcrc_if_needed(local_location)
226
- required_binaries = ['xcld', 'xclibtool', 'xcpostbuild', 'xcprebuild', 'xcprepare', 'xcswiftc']
243
+ required_binaries = ['xcld', 'xcldplusplus', 'xclibtool', 'xcpostbuild', 'xcprebuild', 'xcprepare', 'xcswiftc']
227
244
  binaries_exist = required_binaries.reduce(true) do |exists, filename|
228
245
  file_path = File.join(local_location, filename)
229
246
  exists = exists && File.exist?(file_path)
@@ -309,7 +326,7 @@ module CocoapodsXCRemoteCacheModifier
309
326
  end
310
327
 
311
328
  # Remove .lldbinit rewrite
312
- save_lldbinit_rewrite(nil) unless !@@configuration['modify_lldb_init']
329
+ save_lldbinit_rewrite(nil,nil) unless !@@configuration['modify_lldb_init']
313
330
  end
314
331
 
315
332
  # Returns the content (array of lines) of the lldbinit with stripped XCRemoteCache rewrite
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module CocoapodsXcremotecache
16
- VERSION = "0.0.10"
16
+ VERSION = "0.0.13"
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-xcremotecache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Polaczyk
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-05-11 00:00:00.000000000 Z
12
+ date: 2022-07-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: CocoaPods plugin that enables XCRemoteCache with the project.
15
15
  email: