Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle record screenshot task failing - but works #49

Open
ParohyGr opened this issue May 19, 2023 · 3 comments
Open

Gradle record screenshot task failing - but works #49

ParohyGr opened this issue May 19, 2023 · 3 comments

Comments

@ParohyGr
Copy link

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.

@rharter
Copy link
Collaborator

rharter commented May 21, 2023 via email

@ParohyGr
Copy link
Author

Gradle: 8.0
AGP: 8.0.1
Kotlin: 1.8.0

@vincent-paing
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants