google / play-services-plugins

Plugins to help with using Google Play services SDK.
https://developers.google.com/android/guides/overview
Apache License 2.0
471 stars 138 forks source link

Overlapping outputs on task GoogleServicesTask #304

Open cdsap opened 3 weeks ago

cdsap commented 3 weeks ago

When executing a build in a project with multiple variants, the second GoogleServicesTask doesn’t store its output in the cache because:

Overlapping outputs: Gradle does not know how the file 'build/gmpAppId.txt' was created (output property 'gmpAppId'). 
Task output caching requires exclusive access to output paths to guarantee correctness 
(i.e., multiple tasks are not allowed to produce output in the same location).

https://scans.gradle.com/s/2fcbiunstb676/timeline?details=jbbffnz6hvwhc&type=com.google.gms.googleservices.GoogleServicesTask

To Reproduce Steps to reproduce the behavior:

  1. Download repo git clone git@github.com:android/nowinandroid.git
  2. Execute ./gradlew assembleDebug --scan
  3. Open Build Scan > TimeLine > Filter type GoogleServicesTask > Open details second task
  4. Second task shows overlapping outputs

Expected behavior multiple tasks are not allowed to produce output in the same location

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context https://docs.gradle.org/current/userguide/build_cache_concepts.html#concepts_overlapping_outputs