Add support for excluded sdks by polac24 · Pull Request #196 · spotify/XCRemoteCache
Add an extra feature (still in the experimental phase) to exclude XCRemoteCache in some SDKs.
e.g. to disable XCRemoteCache for watchOS, a developer can either
- pass
--sdks-exclude "watchos*, watchsimulator*"to thexcprepare integratecommand or - set
'exclude_sdks_configurations' => ["watchos*", "watchsimulator*"]to thexcremotecacheconfiguration in Podfile
Implementation
This PR includes:
- Allows disabling remote cache in
pre_buildwith build settingXCRC_DISABLED = YES. This ensures the rebuild script will not unnecessarily download an artifact (if a matching one exists on a remote server) which will not be used. Same for post_build (not not unnecessary upload artifacts) and marking (to not mark artifacts are available). - Introduces
--sdks-excludeparam to the CLI integration, which (in the project integration) overrides all XCRC-related params to "" for all SDK configurations listed in an argument - ^ the same for the cocoapods integration with
exclude_sdks_configurationsconfiguration. - To verify the cocoapods integration (it is the most commonly used scenario), an extra test scenario is added which 1) disables XCRC for "iPhone" SDK and expects 0 hits and 0 misses, 2) disables XCRC for the "WatchOS" SDK and expects 100% hit rate (keep in mind that we build an iPhone app in the test)