Skip to content

Overlapping outputs on task GoogleServicesTask #304

@cdsap

Description

@cdsap

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):

  • Gradle version: 8.10
  • Plugin name and version: com.google.android.gms.oss-licenses-plugin 0.16.1 - com.google.gms.google-services 4.4.1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions