Skip to content

PrepareSandboxTask is missing outputs #1730

@jhonnen

Description

@jhonnen

What happened?

When prepareTestSandbox is loaded FROM-CACHE, the test tasks fails because of missing input directories.

Relevant log output or stack trace

* What went wrong:
A problem was found with the configuration of task ':test' (type 'Test').
  - Type 'org.gradle.api.tasks.testing.Test' property 'jvmArgumentProviders.$4.sandboxConfigDirectory' specifies directory '<projectDir>\build\idea-sandbox\IC-2024.1\config-test' which doesn't exist.

    Reason: An input file was expected to be present but it doesn't exist.

Steps to reproduce

With build cache enabled, execute gradlew prepareTestSandbox, delete the build dir and run gradlew test.

-> build/idea-sandbox/IC-2024.1/plugins-test is correctly restored from cache, but not config-test

PrepareSandboxTask needs to declare all output directories it creates. Also it might make sense to disable caching anyway for this I/O-focused task.

Gradle IntelliJ Plugin version

2.0.0

Gradle version

8.9

Operating System

None

Link to build, i.e. failing GitHub Action job

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions