dropshots icon indicating copy to clipboard operation
dropshots copied to clipboard

Gradle record screenshot task failing - but works

Open ParohyGr opened this issue 2 years ago • 3 comments
trafficstars

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

Hmm, can you share what version of AGP and Kotlin you're using? It's odd that the error message only mentioned AGP tasks, though it is the Dropshots directory.

On Fri, May 19, 2023, 06:20 Tomas Paronai @.***> wrote:

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:updateDebugAndroidTestScreenshots' (type 'PullScreenshotsTask').
    • Gradle detected a problem with the following location: '.../src/androidTest/screenshots'.

      Reason: Task ':app:mergeBaseDebugAndroidTestAssets' uses this output of task ':app:updateDebugAndroidTestScreenshots' 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:updateDebugAndroidTestScreenshots' as an input of ':app:mergeBaseDebugAndroidTestAssets'.
      2. Declare an explicit dependency on ':app:updateDebugAndroidTestScreenshots' from ':app:mergeBaseDebugAndroidTestAssets' using Task#dependsOn.
      3. Declare an explicit dependency on ':app:updateDebugAndroidTestScreenshots' 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.

— Reply to this email directly, view it on GitHub https://github.com/dropbox/dropshots/issues/49, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ4S3Q3544S3WTYCC77WJTXG5JRPANCNFSM6AAAAAAYHU3RVU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rharter avatar May 21 '23 00:05 rharter

Gradle: 8.0 AGP: 8.0.1 Kotlin: 1.8.0

ParohyGr avatar May 22 '23 07:05 ParohyGr

Can replicate too.

AGP: 8.1.0 Kotlin : 1.8.10 Gradle: 8.2

I think it has to do with having different flavor of build

vincent-paing avatar Sep 04 '23 01:09 vincent-paing