Skip to content

AGP 8.12 composePreviewRoboelectricTest #732

@papo2608

Description

@papo2608

When using AGP 8.12 I get the following error:

org.gradle.internal.execution.WorkValidationException: Some problems were found with the configuration of task ':app:generateReleaseComposePreviewRobolectricTests' (type 'GenerateComposePreviewRobolectricTestsTask').

  • Gradle detected a problem with the following location: '/.../build/generated/roborazzi/preview-screenshot'.

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

    For more information, please refer to https://docs.gradle.org/9.0.0/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

  • Gradle detected a problem with the following location: '/.../build/generated/roborazzi/preview-screenshot'.

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

Any idea what may be the root cause here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions