dropshots icon indicating copy to clipboard operation
dropshots copied to clipboard

Gradle record screenshot task failing - but works

Open ParohyGr opened this issue 1 year ago • 3 comments

When I run the command ./gradlew :app:connectedAndroidTest -Pdropshots.record I get the following error:

* What went wrong:
A problem was found with the configuration of task ':app:update<flavor>DebugAndroidTestScreenshots' (type 'PullScreenshotsTask').
  - Gradle detected a problem with the following location: '.../src/androidTest/screenshots'.
    
    Reason: Task ':app:mergeBaseDebugAndroidTestAssets' uses this output of task ':app:update<flavor>DebugAndroidTestScreenshots' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':app:update<flavor>DebugAndroidTestScreenshots' as an input of ':app:mergeBaseDebugAndroidTestAssets'.
      2. Declare an explicit dependency on ':app:update<flavor>DebugAndroidTestScreenshots' from ':app:mergeBaseDebugAndroidTestAssets' using Task#dependsOn.
      3. Declare an explicit dependency on ':app:update<flavor>DebugAndroidTestScreenshots' from ':app:mergeBaseDebugAndroidTestAssets' using Task#mustRunAfter.
    

How ever, the screenshots are done as expected. Still have to manually delete the screenshots folder in order to have them generated while this error is happening.

ParohyGr avatar May 19 '23 11:05 ParohyGr