You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes: #1282
The `ProcessGoogleServicesJson` target uses MSBuild's incremental
build (`Inputs`/`Outputs`) which only checks file timestamps. When
switching between environment-specific google-services files (e.g.,
`google-services-stage.json` → `google-services-test.json`), the
target incorrectly skips if timestamps haven't changed.
## Changes
- **Added hash-based cache tracking**: New
`_ComputeGoogleServicesJsonHash` target computes SHA-256 hash of
`@(GoogleServicesJson)` items and writes to
`$(IntermediateOutputPath)$(MSBuildProjectFile).GoogleServicesJson.cache`
- **Updated target inputs**: Changed `ProcessGoogleServicesJson`
inputs from `@(GoogleServicesJson)` to
`@(GoogleServicesJson);$(ProcessGoogleServicesJsonCachePath)` so
MSBuild detects cache file changes when file list changes
- **Clean integration**: Added cache file deletion to
`_CleanProcessGoogleServicesJson` target
This follows the same pattern used by the C# compiler for detecting
source file list changes. When the file list or content changes, the
hash differs, updating the cache file timestamp and triggering
rebuild.
## Example
```xml
<!-- Before: Would skip on second build -->
<GoogleServicesJson Include="Platforms\Android\google-services-$(AppEnvironment).json" />
<!-- Build 1: AppEnvironment=Stage → Creates cache with stage file hash -->
<!-- Build 2: AppEnvironment=Test → Cache hash differs, file updates, target reruns ✓ -->
```
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
0 commit comments